# How do I make this IF/Then function in a cell

Les 13:14 05 Oct 2004
Locked

Hi,

I'm having trouble with an IF/THEN function - I just can't get it right!!

What I want to do is:

I have two cells with numbers in, say B1 and B2
Two more with strings in, say A1 and A2

What I wish to do is

When both B1 and B2 are occupied then cell C1 should be empty
when B1 is occupied and b2 empty then c1 should have the content of A1
when B1 is empty and b2 occupied then c1 should have the content of A2

The IF/Then function will be cited in C1

If I click on either B1 or B2 to remove the content then C1 is to show the correct string from eith A1 or A2

Graphically:

A1: Joe Soap B1: 8 C1: empty
A2: Fred Bloggs B2: 7

A1: Joe Soap B1: C1: Fred Bloggs
A2: Fred Bloggs B2: 7

A1: Joe Soap B1: 8 C1: Joe Soap
A2: Fred Bloggs B2:

Is there an IF/Then expert out there g> who can help?

Les 13:19 05 Oct 2004

Hi,

I'm having trouble with an IF/THEN function - I just can't get it right!!

What I want to do is:

I have two cells with numbers in, say B1 and B2
Two more with strings in, say A1 and A2

What I wish to do is

When both B1 and B2 are occupied then cell C1 should be empty
when B1 is occupied and b2 empty then c1 should have the content of A1
when B1 is empty and b2 occupied then c1 should have the content of A2

The IF/Then function will be cited in C1

If I click on either B1 or B2 to remove the content then C1 is to show the correct string from eith A1 or A2

Graphically:

A1: Joe Soap B1: 8 C1: empty

A2: Fred Bloggs B2: 7

A1: Joe Soap B1: C1: Fred Bloggs

A2: Fred Bloggs B2: 7

A1: Joe Soap B1: 8 C1: Joe Soap

A2: Fred Bloggs B2:

Is there an IF/Then expert out there <g> who can help?

VoG II 13:32 05 Oct 2004

=IF(AND(B1<>"",B2<>""),"",IF(B1<>"",A1,A2))

Les 15:14 05 Oct 2004

As usual VoGâ„˘ right on the ball - I wouldn't have got that in a thousand years!

Thanks, works a treat

Les

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

The Evil Within 2 review-in-progress

InVision Studio takes on Adobe XD and Sketch

iPhone X news: Release date, price, new features & specs

Comment transformer un iPhone en borne Wi-Fi ?