# trim function-how would one incorporate the trim function within the if statement?

1. ## trim function-how would one incorporate the trim function within the if statement?

i am using a formula

in c1
if(a1="a","***","")

sometimes the formula fails in subsequent rows
i suspect that there is a blank space following the "a"

how would one incorporate the trim function within the if statement
or do you have to use a helper column to trim and then evaluate the
trimmed result

thanks  Register To Reply

2. ## re: trim function-how would one incorporate the trim function within the if statement?

Hi,

Use

=if(trim(a1)="a","***","")

Regards

Govind.

[email protected] wrote:

> i am using a formula
>
> in c1
> if(a1="a","***","")
>
> sometimes the formula fails in subsequent rows
> i suspect that there is a blank space following the "a"
>
> how would one incorporate the trim function within the if statement
> or do you have to use a helper column to trim and then evaluate the
> trimmed result
>
> thanks
>  Register To Reply

3. ## re: trim function-how would one incorporate the trim function within the if statement?

if(trim(a1)="a","***",""). --Bruce

"[email protected]" wrote:

> i am using a formula
>
> in c1
> if(a1="a","***","")
>
> sometimes the formula fails in subsequent rows
> i suspect that there is a blank space following the "a"
>
> how would one incorporate the trim function within the if statement
> or do you have to use a helper column to trim and then evaluate the
> trimmed result
>
> thanks
>
>  Register To Reply

4. ## re: trim function-how would one incorporate the trim function within the if statement?

On Thu, 29 Dec 2005 21:19:49 -0500, [email protected] wrote:

thank you
just couldn't get it through my hard head that it was easier than i
was making it

thanks again

>Hi,

>Use

>=if(trim(a1)="a","***","")

>Regards

>Govind.

>i am using a formula
>
>in c1
>if(a1="a","***","")
>
>sometimes the formula fails in subsequent rows
>i suspect that there is a blank space following the "a"
>
>how would one incorporate the trim function within the if statement
>or do you have to use a helper column to trim and then evaluate the
>trimmed result
>
>thanks  Register To Reply