#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 08:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"