Forum Discussion

aliciab83's avatar
aliciab83
Copper Contributor
Jul 19, 2022
Solved

IF/AND/OR formula

Good morning. I am new to using IF/AND/OR formulas and need assistance with a formula.    I am working on a sales report with customers in 14 different states and various cities. I am looking to se...
  • HansVogelaar's avatar
    Jul 19, 2022

    aliciab83 

    Create a lookup range like this, let's say on a sheet named List, in A2:B15.

    And let's say that your sales report has the cities in C2 and down.

    In D2 enter the formula =XLOOKUP(C2, List!$A$2:$A$15, List!$B$2:$B$15, "")

    If you don't have Microsoft 365 or Office 2021, use the following instead:

    =IFERROR(VLOOKUP(C2, List!$A$2:$B$15, 2, FALSE), "")

    Fill down.