Generating a value using the if/and functions

aurael

New Member
Joined
Mar 12, 2011
Messages
2
Sorry about title I am using if/or function

I am using Excel 2007. I currently have the formula
=VLOOKUP(B3,Table1[[Food List]:[calories]],2,0) in cell G3.

I also have drop down boxes in D3,E3 & F3 which are titled amount, grams & millilitres respectively.

I want to add to the G3 formula so that when I select a value from either G3,E3 or F3 from their drop down box, the value already in G3 multiplies by the value selected

I have already attempted this without luck by using the following formula addition

=VLOOKUP(B3,Table1[[Food List]:[calories]],2,0)IF(OR(D3>0,E3>0,F3>0),*G3,"")

I am under the impression that if either D3,E3 or F3 are greater than 0 then the value will be multiplied by the value in G3 or left blank
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Sorry about title I am using if/or function

I am using Excel 2007. I currently have the formula
=VLOOKUP(B3,Table1[[Food List]:[calories]],2,0) in cell G3.

I also have drop down boxes in D3,E3 & F3 which are titled amount, grams & millilitres respectively.

I want to add to the G3 formula so that when I select a value from either G3,E3 or F3 from their drop down box, the value already in G3 multiplies by the value selected

I have already attempted this without luck by using the following formula addition

=VLOOKUP(B3,Table1[[Food List]:[calories]],2,0)IF(OR(D3>0,E3>0,F3>0),*G3,"")

I am under the impression that if either D3,E3 or F3 are greater than 0 then the value will be multiplied by the value in G3 or left blank

=VLOOKUP(B3,Table1[[Food List]:[calories]],2,0)*MAX(D3:F3)

If so desired, custom format the formula cell as:

[=0]"";General
 
Upvote 0
Aladin,
Thankyou for your assitance, that worked great!

I didn't quite understand.... "If so desired, custom format the formula cell as:

[=0]"";General"
 
Upvote 0

Forum statistics

Threads
1,224,540
Messages
6,179,417
Members
452,912
Latest member
alicemil

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