PC Review
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Discussion
If statements
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Discussion
If statements
![]() |
If statements |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I want an IF statement that would be able to do the following:
IF cell A6 is between 1 and 4 then put "A" in cell A7 IF cell A6 is between 5 and 8 then put "B" in cell A7 IF cell A6 is between 9 and 12 then put "C" in cell A7 IF cell A6 is between 13 and 16 then put "D" in cell A7 IF cell A6 is between 17 and 20 then put "E" in cell A7 Any idea how I could do this? Thank you in advance, Mark |
|
|
|
#2 |
|
Junior Member
|
You could try this:
=IF(A6<=4,"A",IF(A6<=8,"B",IF(A6<=12,"C",IF(A6<=16,"D","E")))) Hope this helps, David |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
One way
=CHAR(LOOKUP(D55,{1,5,9,13,17},{65,66,67,68,69})) -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com <Mark.M.Sweeney@gmail.com> wrote in message news:c920c6c4-2555-4135-8318-32beace0769e@s50g2000hsb.googlegroups.com... >I want an IF statement that would be able to do the following: > > IF cell A6 is between 1 and 4 then put "A" in cell A7 > IF cell A6 is between 5 and 8 then put "B" in cell A7 > IF cell A6 is between 9 and 12 then put "C" in cell A7 > IF cell A6 is between 13 and 16 then put "D" in cell A7 > IF cell A6 is between 17 and 20 then put "E" in cell A7 > > > Any idea how I could do this? > > Thank you in advance, Mark |
|
|
|
#4 |
|
Guest
Posts: n/a
|
I would use LOOKUP and set up a lookup table in the sheet or array.
On Wed, 9 Jul 2008 09:49:12 -0700 (PDT), "Mark.M.Sweeney@gmail.com" <Mark.M.Sweeney@gmail.com> wrote: >I want an IF statement that would be able to do the following: > >IF cell A6 is between 1 and 4 then put "A" in cell A7 >IF cell A6 is between 5 and 8 then put "B" in cell A7 >IF cell A6 is between 9 and 12 then put "C" in cell A7 >IF cell A6 is between 13 and 16 then put "D" in cell A7 >IF cell A6 is between 17 and 20 then put "E" in cell A7 > > >Any idea how I could do this? > >Thank you in advance, Mark -- Dave Mills There are 10 type of people, those that understand binary and those that don't. |
|
|
|
#5 |
|
Guest
Posts: n/a
|
I assume you mean 1 and 4, not between 1 and 4
=LOOKUP(A6,{1,5,9,13,17,21},{"A","B","C","D","E","over20"}) Gord Dibben MS Excel MVP On Wed, 9 Jul 2008 09:49:12 -0700 (PDT), "Mark.M.Sweeney@gmail.com" <Mark.M.Sweeney@gmail.com> wrote: >I want an IF statement that would be able to do the following: > >IF cell A6 is between 1 and 4 then put "A" in cell A7 >IF cell A6 is between 5 and 8 then put "B" in cell A7 >IF cell A6 is between 9 and 12 then put "C" in cell A7 >IF cell A6 is between 13 and 16 then put "D" in cell A7 >IF cell A6 is between 17 and 20 then put "E" in cell A7 > > >Any idea how I could do this? > >Thank you in advance, Mark |
|
|
|
#6 |
|
Guest
Posts: n/a
|
On Jul 9, 1:29*pm, "Don Guillett" <dguille...@austin.rr.com> wrote:
> One way > =CHAR(LOOKUP(D55,{1,5,9,13,17},{65,66,67,68,69})) > -- > Don Guillett > Microsoft MVP Excel > SalesAid Software > dguille...@austin.rr.com<Mark.M.Swee...@gmail.com> wrote in message > > news:c920c6c4-2555-4135-8318-32beace0769e@s50g2000hsb.googlegroups.com... > > > > >I want an IF statement that would be able to do the following: > > > IF cell A6 is between 1 and 4 then put "A" in cell A7 > > IF cell A6 is between 5 and 8 then put "B" in cell A7 > > IF cell A6 is between 9 and 12 then put "C" in cell A7 > > IF cell A6 is between 13 and 16 then put "D" in cell A7 > > IF cell A6 is between 17 and 20 then put "E" in cell A7 > > > Any idea how I could do this? > > > Thank you in advance, Mark- Hide quoted text - > > - Show quoted text - Thank you, I put it together without the =CHAR part and it worked fine. I don't know what the =CHAR part does, would it help? |
|
|
|
#7 |
|
Guest
Posts: n/a
|
char(65) is a capital A
Look in the help index for CHAR -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com <Mark.M.Sweeney@gmail.com> wrote in message news:771ba175-7a44-4552-8523-fbc2b35abfea@r66g2000hsg.googlegroups.com... On Jul 9, 1:29 pm, "Don Guillett" <dguille...@austin.rr.com> wrote: > One way > =CHAR(LOOKUP(D55,{1,5,9,13,17},{65,66,67,68,69})) > -- > Don Guillett > Microsoft MVP Excel > SalesAid Software > dguille...@austin.rr.com<Mark.M.Swee...@gmail.com> wrote in message > > news:c920c6c4-2555-4135-8318-32beace0769e@s50g2000hsb.googlegroups.com... > > > > >I want an IF statement that would be able to do the following: > > > IF cell A6 is between 1 and 4 then put "A" in cell A7 > > IF cell A6 is between 5 and 8 then put "B" in cell A7 > > IF cell A6 is between 9 and 12 then put "C" in cell A7 > > IF cell A6 is between 13 and 16 then put "D" in cell A7 > > IF cell A6 is between 17 and 20 then put "E" in cell A7 > > > Any idea how I could do this? > > > Thank you in advance, Mark- Hide quoted text - > > - Show quoted text - Thank you, I put it together without the =CHAR part and it worked fine. I don't know what the =CHAR part does, would it help? |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Depending on if A6 always has a number in it and how high you wanted that
number to be able to go (you can control these with an IF function call if necessary)... =CHAR(65+INT((A6-1)/4)) Rick <Mark.M.Sweeney@gmail.com> wrote in message news:c920c6c4-2555-4135-8318-32beace0769e@s50g2000hsb.googlegroups.com... >I want an IF statement that would be able to do the following: > > IF cell A6 is between 1 and 4 then put "A" in cell A7 > IF cell A6 is between 5 and 8 then put "B" in cell A7 > IF cell A6 is between 9 and 12 then put "C" in cell A7 > IF cell A6 is between 13 and 16 then put "D" in cell A7 > IF cell A6 is between 17 and 20 then put "E" in cell A7 > > > Any idea how I could do this? > > Thank you in advance, Mark |
|
|
|
#9 |
|
Guest
Posts: n/a
|
I'm no expert like some of these other guys but this is what I would do. I
don't know what you want in A7 if A6 is blank or = 0, or if it is greater than 20, but this formula placed in cell A7 would accomplish what you want: =IF(A6<1,"",IF(A6<=4,"A",IF(A6<=8,"B",IF(A6<=12,"C",IF(A6<=16,"D",IF(A6<=20,"E","")))))) >for A6<1 the "" could be changed to whatever you want A7 to produce, same >with a value greater than 20. <Mark.M.Sweeney@gmail.com> wrote in message news:c920c6c4-2555-4135-8318-32beace0769e@s50g2000hsb.googlegroups.com... >I want an IF statement that would be able to do the following: > > IF cell A6 is between 1 and 4 then put "A" in cell A7 > IF cell A6 is between 5 and 8 then put "B" in cell A7 > IF cell A6 is between 9 and 12 then put "C" in cell A7 > IF cell A6 is between 13 and 16 then put "D" in cell A7 > IF cell A6 is between 17 and 20 then put "E" in cell A7 > > > Any idea how I could do this? > > Thank you in advance, Mark |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

