Combine IF Statement with multi-multiplication

abeck1095

New Member
Joined
Feb 25, 2021
Messages
7
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

I am trying to find a formula which will help me do:

If G17 = 1 then multiply Cell F17 by cell D13
If G17 = 2 then multiply Cell F17 by cell E13
If G17 = 3 then multiply Cell F17 by cell F13
If G17 = 4 then multiply Cell F17 by cell G13
If G17 = 5 then multiply Cell F17 by cell H13

My current formula is:

=IF(G17="1",F17*$D$13,IF(G17="2",F17*$E$13,IF(G17="3",F17*$F$13,IF(G17="4",F17*$G$13,IF(G17="5",F17*$H$13)))))

However, I get a "FALSE" response when I try this... I can't figure out how to override the FALSE part of the IF statement?

Sorry if that makes no sense! I can provide a screenshot if needs be.

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Also, I forgot to mention that I will be dragging this formula down approx. 100 lines. The constant conditions being Cells D13, E13, F13, G13, H13.
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=IFERROR(F17*CHOOSE(G17,$D$13,$E$13,$F$13,$G$13,$H$13),"")
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=IFERROR(F17*CHOOSE(G17,$D$13,$E$13,$F$13,$G$13,$H$13),"")
Hi,

Sorry I accidentally sent the reply too early.
Thanks for the quick response, I don't think I explained this very well!
I have attached a screenshot.

So the calculation depends on the space type
Space type 1 = Blue
Space type 2 = Orange
Space type 3 = Grey
Space type 4 = Yellow
Space type 5 = Green

Dependent on the space type, I want to take the value from the corresponding Cell (D13,E13,F13 etc.)
Thanks
 

Attachments

  • Capture.JPG
    Capture.JPG
    115.2 KB · Views: 12
Upvote 0
Did you try my suggestion?
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top