ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF function (https://www.excelbanter.com/excel-worksheet-functions/197161-if-function.html)

MB HEG

IF function
 
I want to calculate our daily goal based on the hours worked in a day. If we
are off that day, the goal is 0. My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")

Pete_UK

IF function
 
That's because you put it inside quotes. Try it this way:

=IF('2007 HRS'!B6="OFF",0,'2007 HRS'!B6*'2007 HRS'!$E$44)

Hope this helps.

Pete

On Aug 1, 1:50*am, MB HEG wrote:
I want to calculate our daily goal based on the hours worked in a day. *If we
are off that day, the goal is 0. *My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")



FSt1

IF function
 
hi
remove the double quotes.
=IF(2007 HRS!B6="OFF",0,2007 HRS'!B6*2007 HRS!$E$44)

regards
FSt1

"MB HEG" wrote:

I want to calculate our daily goal based on the hours worked in a day. If we
are off that day, the goal is 0. My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")


MB HEG

IF function
 
Thank you that works perfect. I tried taking the quotes out, but it kept
putting them back in. I just copied and pasted yours and it works great.


"Pete_UK" wrote:

That's because you put it inside quotes. Try it this way:

=IF('2007 HRS'!B6="OFF",0,'2007 HRS'!B6*'2007 HRS'!$E$44)

Hope this helps.

Pete

On Aug 1, 1:50 am, MB HEG wrote:
I want to calculate our daily goal based on the hours worked in a day. If we
are off that day, the goal is 0. My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")




MB HEG

IF function
 
If I want to also test the words "CE", "ML", "SICK" along with "off" how can
I add that to the formula

"Pete_UK" wrote:

That's because you put it inside quotes. Try it this way:

=IF('2007 HRS'!B6="OFF",0,'2007 HRS'!B6*'2007 HRS'!$E$44)

Hope this helps.

Pete

On Aug 1, 1:50 am, MB HEG wrote:
I want to calculate our daily goal based on the hours worked in a day. If we
are off that day, the goal is 0. My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")




FSt1

IF function
 
hi
just string the ifs togeather upto 7 for 2003 and lower
IF(2007 HRS!B6="OFF","off",IF(2007 HRS!B6="Sick","Sick",IF(2007
HRS!B6="ce","ce",if(2007 HRS!B6="ml","ml",2007 HRS'!B6*2007 HRS!$E$44))))

regards
FSt1

"MB HEG" wrote:

If I want to also test the words "CE", "ML", "SICK" along with "off" how can
I add that to the formula

"Pete_UK" wrote:

That's because you put it inside quotes. Try it this way:

=IF('2007 HRS'!B6="OFF",0,'2007 HRS'!B6*'2007 HRS'!$E$44)

Hope this helps.

Pete

On Aug 1, 1:50 am, MB HEG wrote:
I want to calculate our daily goal based on the hours worked in a day. If we
are off that day, the goal is 0. My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")




Max

IF function
 
Another way, as responsed in your other post:
=IF(ISNUMBER(MATCH('2007 HRS'!B12,{"OFF";"CE";"ML";"VAC"},0)),0,'2007
HRS'!B12*'2007 HRS'!$E$44)
Extend to suit
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,400 Files:356 Subscribers:53
xdemechanik
---
"MB HEG" wrote:
If I want to also test the words "CE", "ML", "SICK" along with "off" how can
I add that to the formula



Dave Peterson

IF function
 
Check your other post.

MB HEG wrote:

If I want to also test the words "CE", "ML", "SICK" along with "off" how can
I add that to the formula

"Pete_UK" wrote:

That's because you put it inside quotes. Try it this way:

=IF('2007 HRS'!B6="OFF",0,'2007 HRS'!B6*'2007 HRS'!$E$44)

Hope this helps.

Pete

On Aug 1, 1:50 am, MB HEG wrote:
I want to calculate our daily goal based on the hours worked in a day. If we
are off that day, the goal is 0. My false value keeps coming up with the
text instead of a number.

=IF('2007 HRS'!B6="OFF",0,"=2007 HRS'!B6*'2007 HRS'!$E$44")




--

Dave Peterson


All times are GMT +1. The time now is 10:24 PM.

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