ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   IF OR Excel Formula Issue (https://www.excelbanter.com/new-users-excel/116187-if-excel-formula-issue.html)

lozzam

IF OR Excel Formula Issue
 
Having trouble putting a formula together.

I have the following formula which works:

Scenario : $d$d = either Weight or Unit or Unknown (of an ingredient)
e8= is a quantity number ( either in grams or units, of an
ingredient. eg 100 or 1)
Raw data is in Nutrition!$b$6:$g$70

The following formula works so far:

f8 ( which is the no. of calories)=if($d$d="weight",e8/100,e8)*vlookup(c8,
Nutrition!$b$6:$g$70,3,false)

But I also want to add to it that

If e8(quantity)=0 or blank or invalid then "qty?" should appear in the f8
cell

The following formula works:
f8=if(or(e8=0,istext(e8)),"qty?",vlookup(c8,Nutrit ion!$b$6:$g$70,3,false))

But I cant seem to combine the two statements to so that

Am completely stuck here, need help asap.

lozzam


Max

IF OR Excel Formula Issue
 
See response to your earlier posting. Easier to keep the ball rolling if you
stay within your original thread.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"lozzam" <u28344@uwe wrote in message news:685506426bfec@uwe...
Having trouble putting a formula together.

I have the following formula which works:

Scenario : $d$d = either Weight or Unit or Unknown (of an ingredient)
e8= is a quantity number ( either in grams or units, of
an
ingredient. eg 100 or 1)
Raw data is in Nutrition!$b$6:$g$70

The following formula works so far:

f8 ( which is the no. of calories)=if($d$d="weight",e8/100,e8)*vlookup(c8,
Nutrition!$b$6:$g$70,3,false)

But I also want to add to it that

If e8(quantity)=0 or blank or invalid then "qty?" should appear in the f8
cell

The following formula works:
f8=if(or(e8=0,istext(e8)),"qty?",vlookup(c8,Nutrit ion!$b$6:$g$70,3,false))

But I cant seem to combine the two statements to so that

Am completely stuck here, need help asap.

lozzam





All times are GMT +1. The time now is 06:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com