View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve M[_3_] Steve M[_3_] is offline
external usenet poster
 
Posts: 6
Default IF Function with ISBLANK

On May 7, 5:12 pm, akphidelt
wrote:
Yea, if you have three possible options, 4, 8, and "" then you can set it up
like

=If(Len(A1)<1,"",If(Right(A1,1)="x",4,8))

So this says, hey if there is nothing in the cell, leave it blank... if
there is an x in a cell with something in it, make it 4... if there is
something in a cell with no x then make it 8.

"Steve M" wrote:
Is it possible to modify this so that if I enter the date with an x it
will return a value of 4 and if I enter just the date alone it will
return a value of 8? The 8 will be the most used value so if I could
have it so that I can use the x as a 'switch' to change the value to 8
then this would work best. I would still need the default to be
blank.


-thanks again


On May 7, 4:32 pm, Steve M wrote:
Thanks akphidelt, that one works. I suppose I was way off. Thanks
again.


On May 7, 4:12 pm, akphidelt
wrote:


Try something like this


=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))


"Steve M" wrote:
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.


So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.


Its a bit confusing to explain, hopefully you can understand.


-Thanks


That is absolutely perfect. Thank you so much.