PC Review


Reply
Thread Tools Rate Thread

If statements

 
 
Mark.M.Sweeney@gmail.com
Guest
Posts: n/a
 
      9th Jul 2008
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
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jul 2008
Posts: 3
 
      9th Jul 2008
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
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      9th Jul 2008
One way
=CHAR(LOOKUP(D55,{1,5,9,13,17},{65,66,67,68,69}))
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
<(E-Mail Removed)> wrote in message
news:c920c6c4-2555-4135-8318-(E-Mail Removed)...
>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


 
Reply With Quote
 
Dave Mills
Guest
Posts: n/a
 
      9th Jul 2008
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), "(E-Mail Removed)"
<(E-Mail Removed)> 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.
 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      9th Jul 2008
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), "(E-Mail Removed)"
<(E-Mail Removed)> 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


 
Reply With Quote
 
Mark.M.Sweeney@gmail.com
Guest
Posts: n/a
 
      9th Jul 2008
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-(E-Mail Removed)...
>
>
>
> >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?
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      9th Jul 2008
char(65) is a capital A
Look in the help index for CHAR

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
<(E-Mail Removed)> wrote in message
news:771ba175-7a44-4552-8523-(E-Mail Removed)...
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-(E-Mail Removed)...
>
>
>
> >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?

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      10th Jul 2008
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


<(E-Mail Removed)> wrote in message
news:c920c6c4-2555-4135-8318-(E-Mail Removed)...
>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


 
Reply With Quote
 
Ray
Guest
Posts: n/a
 
      28th Jul 2008
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.


<(E-Mail Removed)> wrote in message
news:c920c6c4-2555-4135-8318-(E-Mail Removed)...
>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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Iff Statements Klatuu Microsoft Access Queries 2 23rd May 2008 01:30 PM
Multiple Update Set Statements or Multiple DML Statements in one thedudeminds@msn.com Microsoft Access Queries 4 11th Sep 2007 07:34 PM
IF Statements (Mutliple Statements) =?Utf-8?B?RGVlemVs?= Microsoft Excel Worksheet Functions 3 19th Oct 2006 07:13 AM
operator statements, shorting when reusing one of the statements? KR Microsoft Excel Programming 1 4th Aug 2005 07:20 PM
IF statements =?Utf-8?B?Sm9zZSBNb3VyaW5obw==?= Microsoft Excel Worksheet Functions 2 27th Dec 2004 10:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:24 PM.