Help with nested if/or statements

G

Guest

Hi,
I'm trying to construct a formula that does the followin
=IF(AND(OR(ISTEXT(Sheet3!$A$28),ISNUMBER(Sheet3!$A$28))),OR(ISTEXT(Sheet3!A$30),ISNUMBER(Sheet3!A$30),Sheet3!C30,Sheet3!C28),Sheet3!C25)

In plain talk, if there is text or numbers in A28, check if there is text or
numbers in A30, if no in the first IF use c25, if no in the second arguement
use c28, if yes for both use c30

Any ideas?
 
B

Bob Phillips

What is your definition of not text and not numbers?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

Maybe you could try
=CHOOSE(ISBLANK(Sheet3!A28)+ISBLANK(Sheet3!A30)*2+1,Sheet3!C30,Sheet3!C25,Sheet3!C28,"")

Since you didn't say, I used "" if both A28 and A30 are empty. And I assume
when you said "if the cell does not have text or numbers, it is empty" you
meant it is truly empty and not the null string "".
 
B

Bob Phillips

So test for blank

=IF(AND(A28<>"",A30<>""),C30,IF(A28<>"",C25,C28))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

Bob,

Thanks for replying.

That formula returned zero, even though information was in C28 in sheet3!.

I altered the formula to include the link to the other sheet

=IF(AND(Sheet3!A28<>"",Sheet3!A30<>""),Sheet3!C30,IF(Sheet3!A28<>"",Sheet3!C25,Sheet3!C28))

Maybe I should rephrase what I'm looking for. I am copying information from
a website into sheet 3, Paste Special - Text. 90% of the time it fits one
format (2 capture lines), but the 10% of the time is split between 1 capture
line and 3 capture lines.

I chose to look at Sheet3!A30 because it is blank (nothing in the cell) for
the 90% of the time, but it is filled with 3 capture lines. Both A30 and A28
are blank when there is only 1 capture line.

So I need this formula to check A30, if that's blank check A28, if that's
blank pull information from C25. If A30 isn't blank, pull information from
C30, If A30 is blank but A28 is not blank, pull information from C28.

Thanks in advance!
 
G

Guest

JMB,

Thanks for your reply. Your formula didn't work exactly as intended. I
plugged it in, and when the information on Sheet3! changed formats (1,2 or 3
capture lines.. I explain exactly what I mean in this morning's reply to Bob,
above) the reference cell (Sheet3!A28, Sheet3!A30) kept changing! I put $ in
front of the A and 28, but it kept changing where to look for blanks!

Again, thank you for your advice, I look forward to hearing more! For a
detailed rephrasing of my situation, look at this morning's reply to Bob in
this thread.

Regards,
 
G

Guest

We can also look at a different set of reference cells.

With 3 capture lines: C10 has data, C8 has data and C6 has data
With 2 capture lines: C10 no data, C8 has data and C6 has data
With 1 capture line: C10 no data, C8 no data, C6 has data

We're changing the reference cells because A30 was full if I had more than
one datum somewhere else (yay, mission creep).

To re-iterate the result cells desired: With 3 cap lines, pull info from
C30, with 2 cap lines pull info from C28, with one cap line pull info from
C26.


Thanks in advance!

Nick
 
G

Guest

We can also look at a different set of reference cells.

With 3 capture lines: C10 has data, C8 has data and C6 has data
With 2 capture lines: C10 no data, C8 has data and C6 has data
With 1 capture line: C10 no data, C8 no data, C6 has data

We're changing the reference cells because A30 was full if I had more than
one datum somewhere else (yay, mission creep).

To re-iterate the result cells desired: With 3 cap lines, pull info from
C30, with 2 cap lines pull info from C28, with one cap line pull info from
C26.


Thanks in advance!

Nick
 

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