Excel formula.

steven dowsett 0 Reputation points
2026-07-07T13:32:15.5166667+00:00

In excel, I use a formula. I want to reference values that have two properties, one is a value (%) used in a calculation (formula) the other needs some recognition so the formula can be copied down. Here is an example: A (apples) are 20%, B (bananas) are 30%, C (carrots) are 10%, D (dates) are 5%, E (eggplants) are 2%, F (figs) are 10%, etc. The problem I have is I need to reference the E (eggplants) = ?% for the formula, although any given day I receive these % it could different, A,F,E,D or on another day it could be D,F,EA etc. I need the formula to see the two things in order to do the calculations and be copied down. Would a formula like VLookup or Index and Match be a viable solution. Any help would greatly appreciated. Thank you Steven D.

Microsoft 365 and Office | Excel | For education | Windows

1 answer

Sort by: Most helpful
  1. Gabriel-N 19,885 Reputation points Microsoft External Staff Moderator
    2026-07-07T14:02:04.8333333+00:00

    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.

    User's image

    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

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.