Excel conditional formatting

Closed
MJIMS Posts 4 Registration date Tuesday November 4, 2014 Status Member Last seen November 5, 2014 - Nov 4, 2014 at 08:32 PM
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 - Nov 6, 2014 at 06:55 AM
can I make a cell = a value based on the value of another cell?
example: I want to make A2 = 5 if A1 <40.

7 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Nov 5, 2014 at 02:05 AM
"example: I want to make A2 = 5 if A1 <40.
Reply"

in A2 type this formula

=if(a1<40,5,"")
0
MJIMS Posts 4 Registration date Tuesday November 4, 2014 Status Member Last seen November 5, 2014
Nov 5, 2014 at 12:39 PM
that works great! thanks! how can I make A2 =4 if A1 is between a range of 40-45?
0
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Nov 5, 2014 at 12:48 PM
MJIMS, Good afternoon.

"...how can I make A2 =4 if A1 is between a range of 40-45?..."

Try to use it:

A2 --> =IF(AND(A1>=40,A1<=45),4,"")

Is it what you want?
I hope it helps.
0
MJIMS Posts 4 Registration date Tuesday November 4, 2014 Status Member Last seen November 5, 2014
Nov 5, 2014 at 04:40 PM
wonderful. works like a charm.......now can I combine the 2 into 1 cell?

=if(a1<40,5,"")
and....
=IF(AND(A1>=40,A1<=45),4,"")
together?
0

Didn't find the answer you are looking for?

Ask a question
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Nov 5, 2014 at 06:35 PM
MJIMS, Good evening.

Try to use it:

A2 --> =IF(A1<40,5,IF(A1<=45,4,""))

Is it what you want?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
0
MJIMS Posts 4 Registration date Tuesday November 4, 2014 Status Member Last seen November 5, 2014
Nov 5, 2014 at 07:53 PM
Wonderful. I added about 5 more expressions but you gave me the start I needed. Thank you.
0
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Nov 6, 2014 at 06:55 AM
MJIMS, Good morning.

If you have a sequence of intervals to search for, maybe it's better to create a table and use a VLOOKUP function to do the job.

It's a very efficient tool for this kind of work.
0