Partial string in IF statement possible??

  • Thread starter Thread starter PaulW2
  • Start date Start date
P

PaulW2

Hello,

I have an excel sheet where I need to calculate turn around time o
several processes. I used the IF function a couple of times and neste
them into 1 formula. This works great, except under 1 condition: 1 o
the fields in the function contains a string as data.
For a certain group of words, the calculation changes, so I would lik
to be able to use the statement:

IF(A1="part of string",B1,C1)

Since the strings all start with the same letter, it would be ideal t
be able to have the function reconize the cell, because it contain
that part of the string.

I cannot add another column, to convert the string into something, to
create a workaround, since the sheet is embedded in another system.

If anyone can help, I would be very grateful!

Thanks!

Grtz,
Pau
 
Hi Aladin,

Thanks for your reply.

This however is not what I meant.
This targets the whole string in the cell. If I do that I would have t
nest at least 15 such functions.

What I'm trying to do is have the function recognize the first lette
of the string (because all strings that require a different calculatio
begin with the same letter).

If you have any further suggestion, its very welcome!

Oh, to add in: I do not need to search the whole sheet, the formul
only has to check the current row.

My formula (or at least that part of it) was:
IF(A1="string",B1,C1) but here I need to have the exact string in cel
A1. I just want to check for the first character... if possible of
course!

Regards,

Pau
 
=IF(LEFT(A1)=TargetLetter,B1,C1)

TargetLetter is either a letter between double quotes like "A" or a cell
like X2 that houses the letter A.

If it's your intention to trigger a computation depending on the first
letter of the string in A, you could try...

=CHOOSE(MATCH(LEFT(A1),LetterList,0),Computaion1,Computation2,...)

LetterList refers to a range that houses relevant letters, preferably in
ascending order.
 
Back
Top