Excel conditional formatting

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

7 responses

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

in A2 type this formula

=if(a1<40,5,"")
MJIMS Posts 4 Registration date Tuesday 4 November 2014 Status Member Last seen 5 November 2014
5 Nov 2014 à 12:39
that works great! thanks! how can I make A2 =4 if A1 is between a range of 40-45?
Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
5 Nov 2014 à 12:48
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.
MJIMS Posts 4 Registration date Tuesday 4 November 2014 Status Member Last seen 5 November 2014
5 Nov 2014 à 16:40
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?
Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
5 Nov 2014 à 18:35
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
MJIMS Posts 4 Registration date Tuesday 4 November 2014 Status Member Last seen 5 November 2014
5 Nov 2014 à 19:53
Wonderful. I added about 5 more expressions but you gave me the start I needed. Thank you.
Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
6 Nov 2014 à 06:55
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.