A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hello @steven dowsett
Based on your description, it sounds like you have a list of items in one column and their corresponding percentages in another, and you want a formula that can return the correct percentage based on an item reference while still working when copied down.
Assuming:
- Column A contains the item names (Apples, Bananas, Carrots, etc.)
- Column B contains the percentages
- Cell D2 contains the item you want to look up (for example, "Eggplants")
You could use one of the following formulas:
- XLOOKUP (Microsoft 365 / Excel 2021+):
=XLOOKUP(D2,$A$2:$A$100,$B$2:$B$100,"Not found")This searches for the value in D2 within A2:A100 and returns the matching percentage from B2:B100. - VLOOKUP:
=VLOOKUP(D2,$A$2:$B$100,2,FALSE)This looks for the value in D2 in the first column of the table and returns the corresponding percentage from the second column. The FALSE argument ensures an exact match. - INDEX + MATCH:
=INDEX($B$2:$B$100,MATCH(D2,$A$2:$A$100,0))MATCH finds the position of the item, and INDEX returns the percentage from the corresponding row.
If you plan to copy the formula down, make sure to use absolute references (the $ signs, which you can add by pressing F4) so that the lookup range remains fixed as the formula is filled down.
If I've misunderstood your scenario, could you provide a small sample of your data along with the expected result? That would help the community suggest the most appropriate formula.
Hope this helps. Feel free to follow up with additional details if needed.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread