Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 173
Default ignore blank cells in function

I am using WEEKNUM to deliver the week of the year certain dates fall into,
with this i am using ISODD as each odd number will be marked as A in my
sheet and Even numbers as B to match different work teams. E.G 1 =A, 2=B,
3=A, 4=B etc.
But i want to format the whole page to do this so people can fill in the
details and it returns these details. but ISODD counts blank cells or 0 as a
false return so i have a sheet full of falses until the details are filled
in. I guess i am trying to ask how to not include the blank cells in the
function.
i have =ISODD(A1) then next cell =IF(A2=True,"1",IF(A2=FALSE,"2"))
any ideas anyone??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default ignore blank cells in function

First, you can simplify your If statement, because if A2 is not True, it will be
false -- you don't have to check for it.

So your statement: =IF(A2=True,"1",IF(A2=FALSE,"2"))
is the same as: =if(a2=True,"1","2")
is the same as: =if(a2,"1","2")
is the same as: =if(isodd(a1),"1","2")
and further reduced to: =if(isodd(weeknum(...)),"1","2")

To check a1 for data first, use:

=if(a1="","",if(isodd(a1),"1","2"))

--
Regards,
Fred


"Neil" wrote in message
...
I am using WEEKNUM to deliver the week of the year certain dates fall into,
with this i am using ISODD as each odd number will be marked as A in my
sheet and Even numbers as B to match different work teams. E.G 1 =A, 2=B,
3=A, 4=B etc.
But i want to format the whole page to do this so people can fill in the
details and it returns these details. but ISODD counts blank cells or 0 as a
false return so i have a sheet full of falses until the details are filled
in. I guess i am trying to ask how to not include the blank cells in the
function.
i have =ISODD(A1) then next cell =IF(A2=True,"1",IF(A2=FALSE,"2"))
any ideas anyone??



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
how can avoid considering of blank cells in IF function Lika Excel Worksheet Functions 1 June 12th 06 10:27 AM
how to make a formula ignore blank cells Snap Excel Worksheet Functions 6 June 8th 06 12:54 AM
ignore blank cells Leticia Excel Discussion (Misc queries) 3 February 27th 06 05:41 PM
Formula to calculate number of days & ignore blank cells Mifty Excel Discussion (Misc queries) 7 February 13th 06 10:36 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM


All times are GMT +1. The time now is 04:07 PM.

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"