+ Reply to Thread
Results 1 to 5 of 5

no return value if count is 0

  1. #1
    Registered User
    Join Date
    04-06-2021
    Location
    arkansas
    MS-Off Ver
    2016
    Posts
    73

    no return value if count is 0

    I believe this is a formula issue and not a VBA issue.

    On my XREF sheet there is a button to run a macro lookup. top box is input box.
    Input number is any entry in Column A.
    Results should be posted in the STX terminal Box.
    so A75 should return C75.
    It is working perfectly unless the Countif is 0.

    Examples: Cell A75, Cell A442

    Columns with formulas are columns B and G
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: no return value if count is 0

    This is a bit confusing. I am rerally not sure which sheet I am meant to be looking at!! My first impression, however, is that your helper in column B is incorrect and it should read (B2):

    =IF(A2="","",A2&COUNTIF($A$2:A2,A2))

    and your formula in G1 should be:

    =IFNA(VLOOKUP($E$1&ROWS(E$1:E1),$B:$C,2,0),"---")

    However, as I am not sure which sheet I'm supposed to be looking at (and your sample sheet is MASSIVE... far more thna the 10-20 rows we want to see) and you didn't really tell us what you expected to see.... this is all a bit of a guess.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    04-06-2021
    Location
    arkansas
    MS-Off Ver
    2016
    Posts
    73

    Re: no return value if count is 0

    Ok, let me take out some rows for you.
    I dont know how to further explain what is needed.. it is all right there in the description.
    Let's see if this explains it better.

    Sheet XREF

    Cell E1 is where the Input Value is going (if you dont want to use the Form Control macro "Number Lookup")
    Column A has the number to input
    Column B is doing the Countif for the numbers in column A
    Column C are the matching values.
    Column G are all the returned results.

    Examples that are not returning a value to column G are: A14, A20, A8
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-06-2021
    Location
    arkansas
    MS-Off Ver
    2016
    Posts
    73

    Re: no return value if count is 0

    Can anybody help with this???

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: no return value if count is 0

    To repeat:

    =A2&COUNTIF($A$2:A2,A2)

    and

    =IFNA(VLOOKUP($E$1&ROWS(E$1:E1),$B:$C,2,0),"---")

    seem to be the correct formulae. Did you try them? If they do not work, why not?

    The formulae that you were using seemed to be using the wrong ranges...
    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] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  2. [SOLVED] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Domenic in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 11:05 AM
  3. [SOLVED] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. Replies: 18
    Last Post: 09-06-2005, 06:05 AM
  5. [SOLVED] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Domenic in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 09-06-2005, 04:05 AM
  6. Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-30-2005, 11:05 PM

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