If function

K

Katie

I'm going to rephrase an early question I had because I'm
still confused.

A B
1. Ben
2. Andy
3. Jerry
4. Kathy
5. Cameron

I want to assign people with names A-F day 1, G-M day 2,
etc., and I want column B to say it. However the If
function doesn't seem to work. This is similar to what
I've tried:

=If(A2=A*,"Day 1", "Day 2")
=If(Or(A2=A*,A2=B*,A2=C*),"Day 1", "Day 2")

So, obviously I'm wrong, because it's not working, and any
help would be great.
 
D

Debra Dalgleish

The following code checks the first letter (assumes capitals), and
splits at G, M, S and Z:

="Day "&IF(CODE(LEFT(A2,1))<=71,1,IF(CODE(LEFT(A2,1))<=77,2,
IF(CODE(LEFT(A2,1))<=83,3,4)))
 
T

Trevor Shuttleworth

Katie

something like:

=IF(AND(LEFT(A3,1)>="A",LEFT(A3,1)<"G"),"Day
1",IF(AND(LEFT(A3,1)>="G",LEFT(A3,1)<"N"),"Day 2","x"))

Regards

Trevor
 

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