+ Reply to Thread
Results 1 to 2 of 2

MATCH function where the search term varies

  1. #1
    Registered User
    Join Date
    02-08-2005
    Posts
    7

    MATCH function where the search term varies

    Hi,

    I have to use the match function to identify rows listing revenue data. Each company has it's own excel file and the revenue rows are in different places. The problem is that some companies call it "revenues" and others call it "operating revenue". Is there a way to write a formula that'll use the match function to search for "revenues" but if nothing comes up it'll cycle back through and search for "operating revenue"? I tried implanting an OR("revenues","operating revenue") into the MATCH function but then the formula wouldn't work properly. Thanks a lot.

    Joey

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that Column A contains your data...

    B1, copied down:

    =IF(ISNUMBER(MATCH(A1,{"revenues","operating revenue"},0)),"revenue item","non-revenue item")

    OR

    =IF(ISNUMBER(MATCH(A1,$C$1:$C$2,0)),"revenue item","non-revenue item")

    ...where C1:C2 contains "revenues" and "operating revenue". You can add to this list, if need be. If so, adjust the reference accordingly.

    Hope this helps!

    Quote Originally Posted by jbortfeld
    Hi,

    I have to use the match function to identify rows listing revenue data. Each company has it's own excel file and the revenue rows are in different places. The problem is that some companies call it "revenues" and others call it "operating revenue". Is there a way to write a formula that'll use the match function to search for "revenues" but if nothing comes up it'll cycle back through and search for "operating revenue"? I tried implanting an OR("revenues","operating revenue") into the MATCH function but then the formula wouldn't work properly. Thanks a lot.

    Joey

+ 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