+ Reply to Thread
Results 1 to 4 of 4

Repeating values in multiple columns

Hybrid View

  1. #1
    Registered User
    Join Date
    04-15-2005
    Posts
    9

    Repeating values in multiple columns

    I have 2 columns of data, 1 of which is repeating data, and im looking for a formula to give me the ROW # for which the values in 2 cells are TRUE.

    Input Cell A1: code001
    Input Cell A2: 30BE

    Value that i need: the ROW # that contains both of those values. (in this example, i would need it to return ROW 2)

    column A column B
    code001 15BE
    code001 30BE
    code001 45BE
    code001 60BE
    code002 15BE
    code002 30BE
    code002 45BE
    code002 60BE
    etc. etc.

    Can anyone help? Im thinking its a combination of MATCH, INDEX, VLOOKUP, and/or HLOOKUP??

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    i'd do it this way putting a helper column in c
    then B1 will give row.(but remember if two lots of data are repeated it will only give first row found)
    Attached Files Attached Files
    Last edited by martindwilson; 06-18-2008 at 06:22 PM.

  3. #3
    Registered User
    Join Date
    04-15-2005
    Posts
    9
    Thanks, thats kinda what i did (without the space), just didnt know if there was a way around it.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    ok try using either of these array formulas
    they need to be entered with ctrl+shift+enter
    =MATCH(A2 & CHAR(1) & B2, A4:A11 & CHAR(1) & B4:B11, 0)+3
    this applies to sheet I have attached it's in C2
    or
    =MATCH(1, (A2=A4:A11) * (B2=B4:B11), 0)+3
    in D2
    apparently the second is the one to go with! no idea why

    you would have to adjust cell ref as required
    note the +3 at end is to return the correct row from sheet as data does not start until row 4 else it would tell you say, martin smith was in row 1
    Attached Files Attached Files
    Last edited by martindwilson; 06-21-2008 at 09:30 PM.

+ 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