Macros with IF

B

Benoit

Hello,

I would like to do the following.

Let's say I have in the following fields:

A1: 555000
A2: 555111
A3: 555222
A4: 555333
A5: 555444

When I go into the cell "B1", I wanna use a macro that's
gonne put a "1" in the "B1" cell if the cell "A1"
has "555000" or "555222" or "555444" in it. Otherwise,
put a "0".

How can I do that???

Thanks!!!
 
B

Bob Phillips

Benoit,

In B1, put

=if(or(a1=555000,a1=555222,a1=555444),1,0)

and copy down

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top