ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If formula (https://www.excelbanter.com/excel-programming/298467-if-formula.html)

John M[_5_]

If formula
 
I have the need to use an if statement in a formula to say
the following but arent sure how to code it,

If(k4=G4 Then BONUS, ElseIf k4=0.00 Then NIL ElseIf
A4:Z4="" Then ERROR else OTHER End If

Meaning if K4 is the same as G4 then print the word BONUS,
If K4 = 0.00 then print the word NIL, if there are any
blanks between A4 and Z4 then print the word ERROR in all
other circumstances print the word OTHER.

This will be going in Cell AA4 hence checking for any
blanks in A4:Z4.

John

Frank Kabel

If formula
 
Hi John
try
=IF(K4=G4,"BONUS",IF(K4=0,"",IF(COUNTBLANK($A$4:$Z $4)0,"ERROR","OTHER"
)))

--
Regards
Frank Kabel
Frankfurt, Germany


John M wrote:
I have the need to use an if statement in a formula to say
the following but arent sure how to code it,

If(k4=G4 Then BONUS, ElseIf k4=0.00 Then NIL ElseIf
A4:Z4="" Then ERROR else OTHER End If

Meaning if K4 is the same as G4 then print the word BONUS,
If K4 = 0.00 then print the word NIL, if there are any
blanks between A4 and Z4 then print the word ERROR in all
other circumstances print the word OTHER.

This will be going in Cell AA4 hence checking for any
blanks in A4:Z4.

John



Bob Phillips[_6_]

If formula
 
=IF(K4=G4,"BONUS",IF(K4=0,"NIL",IF(COUNTBLANK(A4:Z 4)<0,"ERROR","OTHER")))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"John M" wrote in message
...
I have the need to use an if statement in a formula to say
the following but arent sure how to code it,

If(k4=G4 Then BONUS, ElseIf k4=0.00 Then NIL ElseIf
A4:Z4="" Then ERROR else OTHER End If

Meaning if K4 is the same as G4 then print the word BONUS,
If K4 = 0.00 then print the word NIL, if there are any
blanks between A4 and Z4 then print the word ERROR in all
other circumstances print the word OTHER.

This will be going in Cell AA4 hence checking for any
blanks in A4:Z4.

John





All times are GMT +1. The time now is 01:25 PM.

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