Forum Discussion
HelpandImproveAP
Mar 23, 2022Copper Contributor
Require assistance on an IF formula please
Hi, Really hoping someone can help with my query -- I am looking to use a formula that is using one cell (A1) as data but cell A1 has a dropdown list with numerous other options... say Test 1, Te...
HansVogelaar
Mar 23, 2022MVP
If you have just a few options, enter the following formula in A2:
=LOOKUP(A1,{"Test 1","Test 2","Test 3"},{10,20,30})
If you have a larger number of options, create a range with the values Test 1, Test 2 etc. in the first column, and the corresponding values 10, 20, etc. in the second column. Name this range List.
You can then use
=VLOOKUP(A1, List, 2, FALSE)
- HelpandImproveAPMar 23, 2022Copper ContributorHi,
Thanks so much for your swift response.
I've tried both but unfortunately it's not working...
Can you breakdown what those formulas do please as I'm a bit confused as to the second formula? If I know this I could think of a workaround- HansVogelaarMar 23, 2022MVP
Here is a picture. The formula =VLOOKUP(A1, List, 2, FALSE) takes the value of cell A1 (Test 12 in the screenshot), and looks it up in the first column of the List range. It then returns the corresponding value from the 2nd column of the List range. The 4th argument FALSE tells Excel to look for an exact match.
- HelpandImproveAPMar 23, 2022Copper ContributorActually, I've looked it up on Youtube and the VLOOKUP formula is correct and I've managed to get it to work. Thanks very much for your help, really appreciated.