ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to replace a cell if value is alphabetic (https://www.excelbanter.com/excel-worksheet-functions/93901-how-replace-cell-if-value-alphabetic.html)

Hejde

How to replace a cell if value is alphabetic
 
I have this chart where I need to combine the contents of 2 cells - A & C -
But if A is alphabetic I need it to combine B & D instead. Any good ideas?

A B C D
WC1 406 20062442 93082813


How to replace a cell if value is alphabetic
 
Hi

Presuming by 'combine' you mean add, you could try something like this:
=IF(ISTEXT(A1),B2+D2,A2+C2)

Hope this helps.
Andy.

"Hejde" wrote in message
...
I have this chart where I need to combine the contents of 2 cells - A & C -
But if A is alphabetic I need it to combine B & D instead. Any good ideas?

A B C D
WC1 406 20062442 93082813




Hejde

How to replace a cell if value is alphabetic
 
Hi Andy

No, I mean combine :o) What I have done is this simple formula: =A1&"-"&C1 -
The result becomes WC1-20062442 - But as I wrote in my inicial message, if A
is alphabetic I need it to combine B & D instead. Do you know how to do that?

Thanks :o)

"Andy" skrev:

Hi

Presuming by 'combine' you mean add, you could try something like this:
=IF(ISTEXT(A1),B2+D2,A2+C2)

Hope this helps.
Andy.

"Hejde" wrote in message
...
I have this chart where I need to combine the contents of 2 cells - A & C -
But if A is alphabetic I need it to combine B & D instead. Any good ideas?

A B C D
WC1 406 20062442 93082813






How to replace a cell if value is alphabetic
 
Sorry!
Try this:
=IF(ISTEXT(A1),B2&"-"&D2&"-",A2&"-"&C2&"-")
or
=IF(ISTEXT(A1),CONCATENATE(B2,"-",D2,"-"),CONCATENATE(A2,"-",C2,"-"))

Andy.

"Hejde" wrote in message
...
Hi Andy

No, I mean combine :o) What I have done is this simple formula:
=A1&"-"&C1 -
The result becomes WC1-20062442 - But as I wrote in my inicial message, if
A
is alphabetic I need it to combine B & D instead. Do you know how to do
that?

Thanks :o)

"Andy" skrev:

Hi

Presuming by 'combine' you mean add, you could try something like this:
=IF(ISTEXT(A1),B2+D2,A2+C2)

Hope this helps.
Andy.

"Hejde" wrote in message
...
I have this chart where I need to combine the contents of 2 cells - A &
C -
But if A is alphabetic I need it to combine B & D instead. Any good
ideas?

A B C D
WC1 406 20062442 93082813







Hejde

How to replace a cell if value is alphabetic
 
Thanks Andy - That was just the one I needed!

"Andy" skrev:

Sorry!
Try this:
=IF(ISTEXT(A1),B2&"-"&D2&"-",A2&"-"&C2&"-")
or
=IF(ISTEXT(A1),CONCATENATE(B2,"-",D2,"-"),CONCATENATE(A2,"-",C2,"-"))

Andy.

"Hejde" wrote in message
...
Hi Andy

No, I mean combine :o) What I have done is this simple formula:
=A1&"-"&C1 -
The result becomes WC1-20062442 - But as I wrote in my inicial message, if
A
is alphabetic I need it to combine B & D instead. Do you know how to do
that?

Thanks :o)

"Andy" skrev:

Hi

Presuming by 'combine' you mean add, you could try something like this:
=IF(ISTEXT(A1),B2+D2,A2+C2)

Hope this helps.
Andy.

"Hejde" wrote in message
...
I have this chart where I need to combine the contents of 2 cells - A &
C -
But if A is alphabetic I need it to combine B & D instead. Any good
ideas?

A B C D
WC1 406 20062442 93082813








How to replace a cell if value is alphabetic
 
Thanks for the feedback - glad to help!

Andy.

"Hejde" wrote in message
...
Thanks Andy - That was just the one I needed!

"Andy" skrev:

Sorry!
Try this:
=IF(ISTEXT(A1),B2&"-"&D2&"-",A2&"-"&C2&"-")
or
=IF(ISTEXT(A1),CONCATENATE(B2,"-",D2,"-"),CONCATENATE(A2,"-",C2,"-"))

Andy.

"Hejde" wrote in message
...
Hi Andy

No, I mean combine :o) What I have done is this simple formula:
=A1&"-"&C1 -
The result becomes WC1-20062442 - But as I wrote in my inicial message,
if
A
is alphabetic I need it to combine B & D instead. Do you know how to do
that?

Thanks :o)

"Andy" skrev:

Hi

Presuming by 'combine' you mean add, you could try something like
this:
=IF(ISTEXT(A1),B2+D2,A2+C2)

Hope this helps.
Andy.

"Hejde" wrote in message
...
I have this chart where I need to combine the contents of 2 cells - A
&
C -
But if A is alphabetic I need it to combine B & D instead. Any good
ideas?

A B C D
WC1 406 20062442 93082813










All times are GMT +1. The time now is 12:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com