Help with code  
Author Message
MumboJumbo





PostPosted: Mon Apr 04 09:43:01 CDT 2005 Top

Excel Programming >> Help with code

I am trying to write a code but I can't work out how to do it.


The code is

=if(a1=f1,"1",)

How do I add

=if(a1=f2,"2","")

Thanks in advance

Greg

Excel214  
 
 
Harald





PostPosted: Mon Apr 04 09:43:01 CDT 2005 Top

Excel Programming >> Help with code Hi Greg

=IF(A1=F1,1,IF(A1=F2,2,0))
but if you want to further add f3, f4, f5 , ... then
=MATCH(A1,F1:F1000,0)
may be what you want

HTH. Best wishes Harald



> I am trying to write a code but I can't work out how to do it.
>
>
> The code is
>
> =if(a1=f1,"1",)
>
> How do I add
>
> =if(a1=f2,"2","")
>
> Thanks in advance
>
> Greg
>
>
>
>


 
 
Greg





PostPosted: Mon Apr 04 10:05:34 CDT 2005 Top

Excel Programming >> Help with code Thank you for that

Works great

Greg