How about this?
=LEFT("CB001000",11-LEN(B3))&B3
David Rose
Quote:
|
Originally Posted by Dave Peterson
First, I don't use the =concatenate() function. It takes too long to type and
could eat up a function call in a long expression.
I use the & operator:
=concatenate("cb0010",b3)
is the same as:
="cb0010"&b3
Another posibility for both numbers and text:
=IF(OR(LEN(B3)<3,LEN(B3)>5),"","CB0010"&REPT("0",5-LEN(B3))&B3)
James8309 wrote:
>
> Hi everyone
>
> I have different digit of numbers in column B and I am trying to use
> "if" and " concatenate" statement together but it creates an error.
>
> =IF(LEN(B3)=5,CONCATENATE("CB0010",B3),IF(LEN(B3)=4,CONCATENATE("CB00100",B3),IF(LEN(B3)=3,CONCATENATE("CB001000",B3),"")))
>
> if I just go if(len(b3)=5,concatenate("CB0010",b3),"") then it works
> fine but above formula returns 0
>
> can anyone help?
>
> thank you
>
> regards,
>
> James
--
Dave Peterson
|