Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default if statement where cell is not empty

when writing if statements, if I want a certain action when the cell is empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.

Matt
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default if statement where cell is not empty

"mattguerilla" wrote in message
...
when writing if statements, if I want a certain action when the cell is
empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write
the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.


=if(A1="","do something else","do this")

or =IF(ISBLANK(A1),"do something else","do this")
--
David Biddulph


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 256
Default if statement where cell is not empty

Try...

=IF(A1<"","Do This","Do Something Else")

Hope this helps!

In article ,
mattguerilla wrote:

when writing if statements, if I want a certain action when the cell is empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.

Matt

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default if statement where cell is not empty

IF(A1<"","do this","do something else")


"mattguerilla" skrev:

when writing if statements, if I want a certain action when the cell is empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.

Matt

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 301
Default if statement where cell is not empty

=IF(A1<"","Not empty","Empty")

"mattguerilla" wrote in message
...
when writing if statements, if I want a certain action when the cell is
empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write
the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.

Matt





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default if statement where cell is not empty

=If(A1<"","do this","do that")

< means "Is not"/"Not equal to" so <"" means "is not empty"

BUT equally

=if(A1="","do this","do something else") would also work as the "do
something else" is actioned if A1 is not empty.

HTH

"mattguerilla" wrote:

when writing if statements, if I want a certain action when the cell is empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.

Matt

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 207
Default if statement where cell is not empty

Mattguella,
This works for a cell that is empty:
Cell A1 - blank, cell A2 - =IF(A1="", "got it!", "Aint got it!")
This works for a cell that is not empty:
Cell A2 - blank, cell B2 - =IF(A2="", "Aint got it!","Got it!")
Good luck,

"mattguerilla" wrote:

when writing if statements, if I want a certain action when the cell is empty
i write - if(A1="","do this","do something else"). But if I want it to do
something when there is anything in the cell in question how do I write the
statement? ie, if(A1="anything","do this","do something else".

Hope I am making sense.

Matt

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
Empty Date Cell as Zero [email protected] Excel Discussion (Misc queries) 1 September 22nd 06 01:09 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Refering to an empty cell Nicoscot Excel Discussion (Misc queries) 1 March 10th 06 12:59 AM
Text wider than one cell is not displayed in the next empty cell Len Pace Excel Discussion (Misc queries) 5 February 18th 05 12:24 AM
How do I set a cell to "Empty" so that it does not display in a ch Ian Charts and Charting in Excel 3 January 7th 05 01:12 AM


All times are GMT +1. The time now is 03:42 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"