Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 217
Default If Statements - Pick up Alpha Characters

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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statements - Pick up Alpha Characters

Louise,

ISTEXT will do that

=IF(ISTEXT(A1),B1,"")
Drag down

Mike

"Louise" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default If Statements - Pick up Alpha Characters

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

On Jun 30, 12:31*pm, Louise wrote:
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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statements - Pick up Alpha Characters

Maybe instead,

=IF(ISTEXT(A1),B1,A1)

Mike

"Mike H" wrote:

Louise,

ISTEXT will do that

=IF(ISTEXT(A1),B1,"")
Drag down

Mike

"Louise" wrote:

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.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default If Statements - Pick up Alpha Characters

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 #"


"Louise" wrote:

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.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default If Statements - Pick up Alpha Characters

Sorry, I misread what you wanted:

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

Hope this helps.

Pete

On Jun 30, 12:46*pm, Pete_UK wrote:
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

On Jun 30, 12:31*pm, Louise wrote:



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.- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default If Statements - Pick up Alpha Characters

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

"Louise" skrev i meddelelsen
...
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.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default If Statements - Pick up Alpha Characters

And STILL I got it wrong:

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

Need a proof-reader !! <bg

Pete

On Jun 30, 12:48*pm, Pete_UK wrote:
Sorry, I misread what you wanted:

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

Hope this helps.

Pete

On Jun 30, 12:46*pm, Pete_UK wrote:



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


On Jun 30, 12:31*pm, Louise wrote:


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.- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 217
Default If Statements - Pick up Alpha Characters

Hi Mike,

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

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

"Mike H" wrote:

Maybe instead,

=IF(ISTEXT(A1),B1,A1)

Mike

"Mike H" wrote:

Louise,

ISTEXT will do that

=IF(ISTEXT(A1),B1,"")
Drag down

Mike

"Louise" wrote:

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.

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
Find alpha all characters TrevorM Excel Discussion (Misc queries) 5 November 13th 07 09:20 AM
Ranking Alpha Characters Padster Excel Discussion (Misc queries) 3 June 14th 07 07:31 PM
How can I pick up characters after the first 4 in Excel cell KKay Excel Discussion (Misc queries) 6 June 23rd 06 02:17 PM
Alpha characters problem? TMF in MN Excel Worksheet Functions 1 February 23rd 06 07:05 PM
Check for Alpha characters TimE Excel Discussion (Misc queries) 4 November 10th 05 12:31 AM


All times are GMT +1. The time now is 04:15 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"