View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
mphell0
 
Posts: n/a
Default Problem with IF function


A couple things:

1) You need quotation marks around the word Error in order for the
function
to return "Error" if it doesn't find any of the values

2) If you are only searching for part of a text value (i.e. "Q1"
instead of "Q1-86")
then you need to put the following statement in front of each "Q" in
order for it
to only find the first 2 characters of that string:

LEFT(A4,2)

The final formula should read:

=IF(LEFT(A4,2)="Q1",U10,IF(LEFT(A4,2)="Q2",U11,IF( LEFT(A4,2)="Q3",U12,IF(LEFT(A4,2)="Q4",U13,
"Error"))))


--
mphell0
------------------------------------------------------------------------
mphell0's Profile: http://www.excelforum.com/member.php...o&userid=30153
View this thread: http://www.excelforum.com/showthread...hreadid=502920