IF function help

G

Guest

I have a column of numbers ranging from 1 to 80 (column A). I wish to make 3
more columns to display the numbers in Column A such that Column B contains
numbers below 20, column C numbers between 20-40, and column D displays
numbers above 40. For the column B I applied " IF ([cell ref]>21,[cell
ref],0" which works ok, but I cannot find a correct formula for "IF ([cell
ref] >21 but <41,[cell ref],0" for column C. Can anybody help please?

Chrys
 
R

Rob Bovey

Chrys said:
I have a column of numbers ranging from 1 to 80 (column A). I wish to make
3
more columns to display the numbers in Column A such that Column B
contains
numbers below 20, column C numbers between 20-40, and column D displays
numbers above 40. For the column B I applied " IF ([cell ref]>21,[cell
ref],0" which works ok, but I cannot find a correct formula for "IF ([cell
ref] >21 but <41,[cell ref],0" for column C. Can anybody help please?

Hi Chrys,

=IF(AND([cell ref]>21,[cell ref]<41),[cell ref],"")

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
 
G

Guest

Thanks Rob,
That's saved me a lot of time. I've been diddling with this for an hour.
Much appreciated,
Regards, Chrys

Rob Bovey said:
Chrys said:
I have a column of numbers ranging from 1 to 80 (column A). I wish to make
3
more columns to display the numbers in Column A such that Column B
contains
numbers below 20, column C numbers between 20-40, and column D displays
numbers above 40. For the column B I applied " IF ([cell ref]>21,[cell
ref],0" which works ok, but I cannot find a correct formula for "IF ([cell
ref] >21 but <41,[cell ref],0" for column C. Can anybody help please?

Hi Chrys,

=IF(AND([cell ref]>21,[cell ref]<41),[cell ref],"")

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
 

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