+ Reply to Thread
Results 1 to 5 of 5

Match Worksheet Function

  1. #1
    Registered User
    Join Date
    07-09-2004
    Posts
    8

    Match Worksheet Function

    Can anyone please help me out - probably an easy one for most of you out there.

    Im trying to return the position of the first non zero value in a range using the match worksheet function.

    Initially I was using the code to return the position of the first "1" in a range when i was only dealing with 0s or 1s.

    Now I am dealing with any integer above 0 so im basically looking to return the position of the first non zero value.

    So far I have tried

    =MATCH(NOT(0),I33:DL33,0)

    but it doesnt seem to work.

    Thanks in advance


    Mike

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try the following...

    =MATCH(TRUE,I33:DL33>0,0)

    ...confirmed with CONTROL+SHIFT+ENTER.

    Hope this helps!

    Quote Originally Posted by MacroMike
    Can anyone please help me out - probably an easy one for most of you out there.

    Im trying to return the position of the first non zero value in a range using the match worksheet function.

    Initially I was using the code to return the position of the first "1" in a range when i was only dealing with 0s or 1s.

    Now I am dealing with any integer above 0 so im basically looking to return the position of the first non zero value.

    So far I have tried

    =MATCH(NOT(0),I33:DL33,0)

    but it doesnt seem to work.

    Thanks in advance


    Mike

  3. #3
    Registered User
    Join Date
    07-09-2004
    Posts
    8

    Re

    Thanks for the help Domenic but when I try this all I get in the box is

    #VALUE!

    Your code does make logical sense but Im having trouble implementing it.

    What do you mean when you say validate it with control shift and enter.

    Thanks again

    Mike

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Instead of pressing just the ENTER key when confirming the formula, press CONTROL+SHIFT, then while holding them down hit the ENTER key. Excel will then place braces {} around the formula and you'll know you've entered it correctly.

    Hope this helps!

    Quote Originally Posted by MacroMike
    Thanks for the help Domenic but when I try this all I get in the box is

    #VALUE!

    Your code does make logical sense but Im having trouble implementing it.

    What do you mean when you say validate it with control shift and enter.

    Thanks again

    Mike

  5. #5
    Registered User
    Join Date
    07-09-2004
    Posts
    8

    Smile Thanks

    Thanks Domenic - Works a treat

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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