Concatenate Different Formats

  • Thread starter Thread starter Alec Kolundzic
  • Start date Start date
A

Alec Kolundzic

I have the following function:

=IF(OR($H102="DI", $H102="DO", $H102="AI", $H102="AO"),IF
($L102<>0,CONCATENATE(RIGHT($C102,2),"",$L102),""),"")

Which, on certain conditions, prefixes the following
numbers with for example 04:

0200
0201
0202
etc

the result should be

040200
040201
040202
etc

However, the result I am getting is:

04200
04201
04202
etc

The original column number format is "0000", but when I
use the above function, I lose the leading "0", I've tried
changing the number format to "text", with no success.

Any ideas'

Thanks
Alec
 
Hi
try
=IF(OR($H102="DI", $H102="DO", $H102="AI", $H102="AO"),IF
($L102<>0,TEXT(RIGHT($C102,2),"00") & TEXT($L102,"0000"),""),"")
 
Thanks Frank, that works a treat.

-----Original Message-----
Hi
try
=IF(OR($H102="DI", $H102="DO", $H102="AI", $H102="AO"),IF
($L102<>0,TEXT(RIGHT($C102,2),"00") & TEXT ($L102,"0000"),""),"")

--
Regards
Frank Kabel
Frankfurt, Germany



.
 
Back
Top