SOLVED

Display price if cell 1 and cell 2 match

Copper Contributor

Hi!

My brain froze and I need your help.

 

On sheet 1 i have a list of items in column A and the corresponding price of said item in column B.

 

On sheet 2 i have a list with a couple of columns with dropdown options based on sheet 1 column A.

 

On sheet 2 I want the price of the selected item to show in column G if sheet 2 column B matches with sheet 1 column A.

 

Any ideas?

Screenshot_20231208-160952~2.png

3 Replies
best response confirmed by n00bi1 (Copper Contributor)
Solution

@n00bi1 

I hope I understood the question correctly. To achieve this in Excel, you can use a combination of the VLOOKUP and IF functions. Assuming your data is organized with items in column A and prices in column B on Sheet1, and you want to display the price in column G on Sheet2 based on the selected item in column B, you can follow these steps:

  1. Sheet1: List of Items and Prices
    • Assume your items are in column A (A2:A100), and corresponding prices are in column B (B2:B100).
  2. Sheet2: Displaying Price in Column G
    • In cell G2 (assuming your data starts from row 2), use the following formula:

=IFERROR(VLOOKUP(B2, Sheet1!$A$2:$B$100, 2, FALSE), "Item not found")

    • Drag this formula down for all the rows in column G where you want the prices to be displayed.

This formula does the following:

    • VLOOKUP(B2, Sheet1!$A$2:$B$100, 2, FALSE): Searches for the value in B2 in Sheet1 column A. If found, it returns the corresponding value from Sheet1 column B.
    • IFERROR(...): Handles the case when the item is not found and displays a custom message ("Item not found" in this case).

Now, when you select an item from the dropdown in column B on Sheet2, the corresponding price should be displayed in column G. If the item is not found, it will show "Item not found" or an error message based on your preference.

Remember to adjust the range (Sheet1!$A$2:$B$100) based on the actual range of your data in Sheet1.The text and steps were edited with the help of AI.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

Was the answer useful? Mark as best response and Like it!

This will help all forum participants.

Exactly what I was looking for! Thank you a thousand times! This will save me hours for future projects!
Thank you for your feedback.
I am pleased that you have made progress with your project.
Wish you Happy Excel-ing!
1 best response

Accepted Solutions
best response confirmed by n00bi1 (Copper Contributor)
Solution

@n00bi1 

I hope I understood the question correctly. To achieve this in Excel, you can use a combination of the VLOOKUP and IF functions. Assuming your data is organized with items in column A and prices in column B on Sheet1, and you want to display the price in column G on Sheet2 based on the selected item in column B, you can follow these steps:

  1. Sheet1: List of Items and Prices
    • Assume your items are in column A (A2:A100), and corresponding prices are in column B (B2:B100).
  2. Sheet2: Displaying Price in Column G
    • In cell G2 (assuming your data starts from row 2), use the following formula:

=IFERROR(VLOOKUP(B2, Sheet1!$A$2:$B$100, 2, FALSE), "Item not found")

    • Drag this formula down for all the rows in column G where you want the prices to be displayed.

This formula does the following:

    • VLOOKUP(B2, Sheet1!$A$2:$B$100, 2, FALSE): Searches for the value in B2 in Sheet1 column A. If found, it returns the corresponding value from Sheet1 column B.
    • IFERROR(...): Handles the case when the item is not found and displays a custom message ("Item not found" in this case).

Now, when you select an item from the dropdown in column B on Sheet2, the corresponding price should be displayed in column G. If the item is not found, it will show "Item not found" or an error message based on your preference.

Remember to adjust the range (Sheet1!$A$2:$B$100) based on the actual range of your data in Sheet1.The text and steps were edited with the help of AI.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

Was the answer useful? Mark as best response and Like it!

This will help all forum participants.

View solution in original post