easy if statement formula

D

danlinksman

I am having a brain freeze and need some help. It has been some time since I
have worked with formulas in excel. I am getting an invalid on the formula.
I have 2 identical worksheets on page one and page 2. I only want certain
data to show on page 2 however. What I want it to do is if h8 on page one is
blank or equal to 3 then leave cell c8 blank on page two, if it contains the
number 1 or 2 then fill c8 on page two with data from c8 of page one.
=IF(Sheet1!H8="","3","",Sheet1!C8)
 
E

Eva

H
=IF(Sheet1!H8="","",IF(Sheet1!H8=3,"",IF(Sheet1!H8=1,Sheet1!H8,IF(Sheet1!H8=2,Sheet1!H8))))

Click yes if helped
 
B

Bob Bridges

Yeah, this is an easy one. You supplied 4 arguments but the IF function
accepts only three: The condition (Sheet1!H8=""), the result if true ("3")
and the result if false (""). What you want is to OR the first two
arguments, like this:

=IF(OR(Sheet1!H8="",Sheet1!H8="3"),"",Sheet1!C8)
 
D

David Biddulph

Anothger point to think about is whether you really want to look for the
text string "3", or whether you might have been intending to test for the
number 3, in which case you don't want the double quotes around it.
 

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