Urgent

D

deepthi

i want to add a column in the excel sheet and and the value should b
determined as follows:


if the last name starts with a, b, c, d, e, f, g, then one value to b
printed and if the last name starts with h, i, j, k, l, m, n, o the
one value and if it starts with p, q, r, s, t, u, v, w, x, y, z the
one value


I appreciate your help.

Thanks

Deepth
 
P

PegL

Assume Last Name list starts in cell A1. Have Named
Range "First" with letters a-g, "Second" with h-o
and "Third" with p-z. The formula in, say H1:
=IF(ISNA(VLOOKUP(LEFT(A1,1),First,1,FALSE)),IF(ISNA
(VLOOKUP(LEFT(A1,1),Second,1,FALSE)),IF(ISNA(VLOOKUP(LEFT
(A1,1),THird,1,FALSE)),"None","Third"),"Second"),"First")
 
B

Bill

If the value for the a-g is "A_G", the Values for the
other two name ranges are "H_O" and "P_Z" and the last
name is in column A, and you want to have the value added
in column b

enter the following equation into the B2

=if(A2<"P",if(A2<"H","A_G","H_O"),"P_Z")

and copy the equaiton down as far as you need to go.
 
M

Mark Graesser

Hi Bill
I use = on text all the time and never thought to try < and >. Clearly the match function I am using is doing just that. Good tip

Regards
Mark Graesse
(e-mail address removed)
Boston M

----- Bill wrote: ----

If the value for the a-g is "A_G", the Values for the
other two name ranges are "H_O" and "P_Z" and the last
name is in column A, and you want to have the value added
in column

enter the following equation into the B

=if(A2<"P",if(A2<"H","A_G","H_O"),"P_Z"

and copy the equaiton down as far as you need to go
 

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