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

Les 13:14 05 Oct 04
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 04

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 04

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

Les 15:14 05 Oct 04

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.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

This abstract video touches on division in our technologic world

Best alternatives to iTunes for Mac | Best music players for macOS: Free your music from the…