Combine IF Statement with multi-multiplication

abeck1095

New Member
Joined
Feb 25, 2021
Messages
4
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
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

abeck1095

New Member
Joined
Feb 25, 2021
Messages
4
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
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.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
Hi & welcome to MrExcel.
How about
Excel Formula:
=IFERROR(F17*CHOOSE(G17,$D$13,$E$13,$F$13,$G$13,$H$13),"")
 
Solution

abeck1095

New Member
Joined
Feb 25, 2021
Messages
4
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
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: 3

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Did you try my suggestion?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,542
Messages
5,625,416
Members
416,101
Latest member
CCoetzee

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
Top