If Statements - Pick up Alpha Characters

  • Thread starter Thread starter Louise
  • Start date Start date
L

Louise

Hi,

Can anyone tell me if there is a way to pick up (using an IF statement)
whether a cell has any letters in it, if a cell has letters in it I need to
pick up another cell.

Example of what I have:

Cost Centre Ref # IF Statement Answer

1234 0012 1234
2345 0014 2345
2346 9987 2346
TED 3865 3865 ** Show Ref # as Cost Centre has Letters in
it.
4678 3678 3678

Many Thanks in advance.
 
Try something like this in C2:

=IF(A2="","",IF(ISERROR(A1+1),"Ref #",A2))

then copy down as required. Relies on the fact that you can't add a
number to a string.

Hope this helps.

Pete
 
Unfortunately there is no IsAlpha function available with VBA like in C++.
But there is a IsNumeric() function available, which you could use.

If (IsNumeric(...) = false) Then ...

Test if the content is numeric. If so do nothing. If not (false) then "Show
Ref #"
 
Sorry, I misread what you wanted:

=IF(A2="","",IF(ISERROR(A1+1),B2,A2))

Hope this helps.

Pete
 
Hi

With cost centre in column A and Ref# in column B enter this in C2 and copy
down

=IF(ISNUMBER(A2),A2,B2)

Regards,
Per
 
And STILL I got it wrong:

=IF(A2="","",IF(ISERROR(A2+1),B2,A2))

Need a proof-reader !! <bg>

Pete
 
Hi Mike,

This works perfectly - THANK YOU SO MUCH - You've just saved me hours of
manual work! :)

********************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top