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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try...

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

Hope this helps!
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,868
Messages
6,122,005
Members
449,059
Latest member
mtsheetz

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