+ Reply to Thread
Results 1 to 4 of 4

Not Posting a Value to a Validation Cell

Hybrid View

  1. #1
    Registered User
    Join Date
    02-22-2025
    Location
    Brighton, England
    MS-Off Ver
    MS 365 Office
    Posts
    2

    Post Not Posting a Value to a Validation Cell

    Hello All,

    I have a table with blank cells for Date, Time, Name, Position, etc., that I complete with a Vlookup formula without issues when a particular cell = Yes. This is not an issue.

    However, one cell has a validation cell with a drop-down box with entries of 1, 2, 3, 4, and up to 100. The user will select the number that applies to a table on another sheet. This works fine if I manually post a number from 1 to 100.

    What I cannot do is tell the VLookup formula not to post anything if there is no number to be posted (i.e. for that event, there is no number to be applied). This is where the validation cell will not accept a null string (i.e. "").

    How do I get around this? I have 160 tables that I want to populate from a separate table. All tables will accept the input except this validation cell, where sometimes I want to post a number and other times I do not. How do I tell the IF formula to apply nothing?

    Any help would be appreciated.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,706

    Re: Not Posting a Value to a Validation Cell

    Welcome to the Forum Nutrastat!

    I am having trouble following your description. Not sure what you mean when you use the word "post" because you seem to be using it to mean more than one thing.

    I can't tell if the crux of the problem is the data validation will not accept null, or a problem in the VLOOKUP, or a problem in an IF formula.

    This is where the validation cell will not accept a null string (i.e. "").
    You can modify your validation rule to expliclitly accept the null string. In fact, the cell should be blank before the user selects anything 1...100.
    VLookup formula
    Please show the formula
    the IF formula
    Please show the formula

    BTW consider using XLOOKUP instead of VLOOKUP.

    It sounds like you have a large file but this will go a lot faster if you can attach your file for analysis.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-22-2025
    Location
    Brighton, England
    MS-Off Ver
    MS 365 Office
    Posts
    2

    Re: Not Posting a Value to a Validation Cell

    Hello,

    Thanks for your response it is appreciated.

    I have put together a simple example, which is attached.

    Tables from Cols A to D will be in my actual file.

    The data for the Vlookup [I will use Xlookup Later] is A22:F26.

    Selecting 'Yes' at G2 will populate A3:D16

    I have an issue with D16 because it defaults to 0 (Zero) when I expect a blank.

    I have allowed a BLANK in variable List_Numbers (F22:F26), but I get zero instead.

    I cannot see what I am doing wrong.

    It must be something simple, but I can't see what.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,706

    Re: Not Posting a Value to a Validation Cell

    The reason I found your initial description confusing is that you did not explicitly say that you have a formula and also a data validation dropdown list in the same cell. This is not unheard of but it's unusual and I'm wondering why you are doing it. Is there something you are not showing in this simplified example that allows the user to override the formula for some reason?

    The problem is that if you refer to a blank cell, it is converted to zero by default. There are two possibilities I can think of:

    Modify your formula to explicitly return a blank if it finds a blank. This is probably the safest and most straightforward. I have attached your sample file with this solution.
    Formula: copy to clipboard
    =IF(Select_Complete="No","",LET(N,VLOOKUP(A16,Array_Data,4,FALSE),IF(N="","",N)))


    Modify your formula to force results to be converted to text
    Formula: copy to clipboard
    =IF(Select_Complete="No","",VLOOKUP(A16,Array_Data,4,FALSE)&"")

    This might be an issue depending on what else you are doing with that result.

    Go to Options > Advanced > Display options for this worksheet
    and uncheck "Show a zero in cells that have zero values"
    However, the cell will still have a zero value, will turn red from your CF, and may have other downstream side effects that you don't want (note my first paragraph). This is my least favorite.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Posting Units In The Cell To The Right
    By jpe1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2019, 12:16 PM
  2. Posting Text to cell using VBA
    By whdmlwp1993 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2016, 08:44 PM
  3. Date and count validation in single cell - Custom Validation
    By murugavelmsc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2013, 05:25 AM
  4. validation rules not working when someone copy paste data on validation cell
    By jthakrar in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-17-2010, 03:36 AM
  5. Posting data to cell
    By bstubbs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2009, 10:03 AM
  6. [SOLVED] Validation Data using Validation Table cell range.....
    By Dermot in forum Excel General
    Replies: 10
    Last Post: 01-30-2006, 09:35 PM
  7. [SOLVED] the owner of posting should be able to delete the posting
    By Mahendra in forum Excel General
    Replies: 7
    Last Post: 08-08-2005, 03:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1