ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to do if/then formula with multiple scenarios. (https://www.excelbanter.com/excel-discussion-misc-queries/114607-how-do-if-then-formula-multiple-scenarios.html)

JudyK

How to do if/then formula with multiple scenarios.
 
I have a product list within the spreasheet. Product #15-6 (cell A1) costs $5
(cell A2), product #16-9 (cell B1) costs $10 (cell B2), and so on. In
another part of the spreadsheet, when I type 16-9, I want the cell next to it
to automatically enter $10. I would need an elaborate if/then formula. Like
if cell D7=A1, then A2, if D7=B1, then B2, if D7=C1, then C2 and so on for
about 9 items. So whatever item number I type in cell D7, then cell D8 will
automatically place the appropriate price there.

Dave F

How to do if/then formula with multiple scenarios.
 
You can only have 7 nested IF functions. To do what you want to do, you
would need to create a lookup table and use the VLOOKUP function.
Information on the function can be found he
http://www.ozgrid.com/Excel/excel-vlookup-formula.htm

Dave
--
Brevity is the soul of wit.


"JudyK" wrote:

I have a product list within the spreasheet. Product #15-6 (cell A1) costs $5
(cell A2), product #16-9 (cell B1) costs $10 (cell B2), and so on. In
another part of the spreadsheet, when I type 16-9, I want the cell next to it
to automatically enter $10. I would need an elaborate if/then formula. Like
if cell D7=A1, then A2, if D7=B1, then B2, if D7=C1, then C2 and so on for
about 9 items. So whatever item number I type in cell D7, then cell D8 will
automatically place the appropriate price there.



All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com