Forum Discussion

AshleighCrighton's avatar
AshleighCrighton
Copper Contributor
Nov 28, 2023

Formula to find data based on information in two different columns

I'm struggling to find the correct formula to get me the data as below:.

 

I have column A, B and C.

Column A has a persons name, Column B has an address, and Column C has a specific size.

 

Basically, I am trying to get a formula that will identify a name in A, then a size in C, which will then enter the address in B in the cell of my choice. 

E.g., If 'Ashleigh' is in cell A, and size 20 is in column C, then my cell should be entered New Zealand.

Is this possible?

 

pic #1 is the data i'm collecting, pic#2 is the cell i am wanting the address in

 

 

 

11 Replies

  • AshleighCrighton 

    Let's say the data in your first picture are in A2:C1000 (with A1:C1 being the headers) on a sheet named Data Sheet.

    On another sheet, you enter a name (or select it from a Data Validation drop-down) in A2 and a size in C2.

    Enter the following formula in B2:

    =XLOOKUP(A2&C2, 'Data Sheet'!$A$2:$A$1000&'Data Sheet'!$C$2:$C$1000, "")

    This can be filled or copied down as far as you want.

     

    • AshleighCrighton's avatar
      AshleighCrighton
      Copper Contributor
      Hi Hans,
      Thanks so much. I'm stuck on the copying from another sheet part.. I have the sheet with all the data on it called 'DUMP', however struggling to figure out how to get the formula to pick up this is the sheet?
      This is what I have changed it to =XLOOKUP(A2&C2, 'DUMP'!$A$2:$A$1000&'DUMP'!$C$2:$C$1000, "")
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        AshleighCrighton 

        Does it work? If not, could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?

Resources