Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
clegge
 
Posts: n/a
Default help with an if statement


1) basically would like to get the following statement to work:
=if(foo!H2=ssbs,"ssbs2","foo'!H2")
basically if fooH2 contains the value SSBS i need to return SSBS2 if it
does not i need to return the value that is presently in fooH2

2) if possiple i would like to make it a compound if ..
if foo!H2=ssbs, then return ssbs2, if foo!H2 = x then return x2, if
foo!H2=x then return x3

thank you in advance for all the help....


--
clegge
------------------------------------------------------------------------
clegge's Profile: http://www.excelforum.com/member.php...o&userid=29927
View this thread: http://www.excelforum.com/showthread...hreadid=499793

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BenjieLop
 
Posts: n/a
Default help with an if statement


<< 1) basically would like to get the following statement to work:
=if(foo!H2=ssbs,"ssbs2","foo'!H2")
basically if fooH2 contains the value SSBS i need to return SSBS2 if it
does not i need to return the value that is presently in fooH2

=IF(FOO!H2=\"SSBS\",\"SSBS2\",FOO!H2)

<< 2) if possiple i would like to make it a compound if ..
if foo!H2=ssbs, then return ssbs2, if foo!H2 = x then return x2, if
foo!H2=x then return x3

THERE IS SOMETHING WRONG WITH THE LOGIC HERE. IF FOO!H2=X, IT CAN ONLY
RETURN EITHER X2 OR X3 BUT NOT BOTH. YOU HAVE TO PICK ONE AND ONLY ONE
OPTION IF FOO!H2=X.

ANYWAY, THIS FORMULA

=IF(FOO!H2=\"SSBS\",\"SSBS2\",IF(FOO!H2=\"X\",\"X2 \",ANY_VALUE)

WILL RETURN

\"SSBS2\" IF FOO!H2=\"SSBS\"
\"X2\" IF FOO!H2=\"X\"

AND WILL RETURN ANY VALUE IF FOO!H2 IS NEITHER \"SSBS\" NOR \"X\"

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=499793

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
clegge
 
Posts: n/a
Default help with an if statement


your right - i did not describe the scenario correctly... basically want
a formula that will return
ssbs2 if there is an ssbs value in h2..
an empty cell if there is a value of x in h2
an empty cell if there is a value of y in h2
an empty cell if there is a value of z in h2
if there is any other vaule in h2 i want the formula to show that
value....

hard to exlain... sory about that


thanks again....


--
clegge
------------------------------------------------------------------------
clegge's Profile: http://www.excelforum.com/member.php...o&userid=29927
View this thread: http://www.excelforum.com/showthread...hreadid=499793

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BenjieLop
 
Posts: n/a
Default help with an if statement


clegge Wrote:
your right - i did not describe the scenario correctly... basically want
a formula that will return
ssbs2 if there is an ssbs value in h2..
an empty cell if there is a value of x in h2
an empty cell if there is a value of y in h2
an empty cell if there is a value of z in h2
if there is any other vaule in h2 i want the formula to show that
value....

hard to exlain... sory about that


thanks again....


=IF(H2=\"SSBS\",\"SSBS2\",IF(OR(H2=\"X\",H2=\"Y\", H2=\"Z\"),\"\",H2))

and if "h2" is the same as "foo!h2" in your original message, then
simply replace all "h2" with "foo!h2" in the above formula.

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=499793

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
clegge
 
Posts: n/a
Default help with an if statement


i think i wast trying to make things to complicated... i ended up using
a vlookup and it worked pretty well... i should have thought of that
from the start...

i am really bad at describing what i need to get done but here goes...

i am doing a vlookup... basically the criteria in *a1* is used against
*column b*, and if there is a hit, the corresponding value in *column
c* is displayed... is ther anyway to have this lookup just return the
originaly criteria *a1* if nothing matches in *column b*


--
clegge
------------------------------------------------------------------------
clegge's Profile: http://www.excelforum.com/member.php...o&userid=29927
View this thread: http://www.excelforum.com/showthread...hreadid=499793



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
IF Statement problem trixma New Users to Excel 3 September 27th 05 06:36 AM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
How to calculate a sum as one outcome of an IF statement barb in NC Excel Worksheet Functions 2 March 31st 05 08:01 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 06:03 PM.

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

About Us

"It's about Microsoft Excel"