need help!!!

Lone Star

New Member
Joined
Oct 16, 2006
Messages
3
Can anyone tell me how to write this formula in Excel?
If D7 is 3 use this formula=SUM(D8*180)+(D9*30)
If D7 is 5 use this formula=SUM(D8*310)+(D9*30)

And what is the name of the formula?

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,726
Try...

=IF(D7=3,(D8*180)+(D9*30),IF(D7=5,(D8*310)+(D9*30),""))

Hope this helps!
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Insert a new sheet and name it Admin.

In A2 enter a name that is descriptive of 30, say, Thirty.
In B2 enter: 30

Name B2 Thirty via the Name Box on the Formula Bar.

In A4 enter: 3
In A5 enter: 5
In B4 enter: 180
In B5 enter: 310

Select A4:B5 and name the selection ConstantTable via the Name Box.

Now invoke...

=D8*VLOOKUP(D7,ConstantTable,2,0)+D9*Thirty
 

respree

Active Member
Joined
Apr 14, 2003
Messages
258
You don't say what you want it to do if D7 is neither 3 or 5.

Assuming you want to display a blank (" ", in this formula), it's:

=IF(D7=3,SUM((+D8*180)+(+D9*30)),IF(D7=5,SUM((+D8*310)+(+D9*30)),""))

Replace the "" for 'whatever you want it to do if neither of the two conditions are met.
 

Lone Star

New Member
Joined
Oct 16, 2006
Messages
3

ADVERTISEMENT

I think it worked...thanks a bunch what is this called?
 

Forum statistics

Threads
1,141,705
Messages
5,707,976
Members
421,539
Latest member
zuniBM

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