Conditional formatting with Offset?

Drrellik

Well-known Member
Joined
Apr 29, 2013
Messages
834
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2011
  5. 2010
Platform
  1. Windows
I want to highlight the cell directly above a certain value in one column.
A B
1 2
2
3
4
5
6
7
8
2
9
10
2
11
12
2
13

my value would be 2 and I want to highlight 1,8,10, & 12

hope that helps

~DR
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Select your range
use following formula for CF
=$A2=2
or
=$A2=$B$2 (if you need to change the value)
format as required
 
Upvote 0
Thank you but that only highlights one value. I want to locate a dynamic value in a column and highlight the cell above it.

T
U
8
11
7
9
7
10
4
11
14
12
1
13
6
14
7
15
24
16
10
17
7
18
17
19
14
20
2
21
3
22
5
23
7

<tbody>
</tbody>
Sheet2

U8 will change daily I want to locate that number in my column and highlight the number or cell above.
 
Last edited:
Upvote 0
Thank you but that only highlights one value. I want to locate a dynamic value in a column and highlight the cell above it.

U8 will change daily I want to locate that number in my column and highlight the number or cell above.

Hi!

Select the range T8:T23 and put the Conditional Formatting (Formula) below:

=T9=$U$8



RSTUV
7
88117
997
10104CF- =T9=$U$8
111114
12121
13136
14147
151524
161610
17177
181817
191914
20202
21213
22225
23237
24
*****************************

<tbody>
</tbody>


Markmzz
 
Last edited:
Upvote 0
Thank you,

That totally works but I don't understand the formula... thank you again
 
Upvote 0
Thank you,

That totally works but I don't understand the formula... thank you again

I will try to explain.

Lets go:

Formula =T9=$U$8

If the active cell is T8 and I tell to Excel to format the cell T8 if the cell T9 (T9 the cell below the cell T8 and T8 is the cell above T9) have the value of the cell U8 (absolute reference - fixed cell)

Then the Excel will format all cell above the cell that have the value of cell U8.

I hope that this helps.

Markmzz
 
Last edited:
Upvote 0
It does, for some reason I thought it would be much harder, but CF is still a learning process.

I also moved my cell reference to the top of the same column. so =A3=$A$3 with A2 selected and then modified the range to cover A3:A200 worked

now the last random number found at the top of my list is in A3 and any other time in the is appears in the column, the random following number is highlighted

Just trying to have fun with the last 200 lottery numbers and looking for that winning number.... lol

Thanks again
 
Upvote 0
Interesting that my solution, which is entirely the same as markmzz does not work? (BTA, I'm no MVP)
 
Last edited:
Upvote 0
It does, for some reason I thought it would be much harder, but CF is still a learning process.
I also moved my cell reference to the top of the same column. so =A3=$A$3 with A2 selected and then modified the range to cover A3:A200 worked

now the last random number found at the top of my list is in A3 and any other time in the is appears in the column, the random following number is highlighted

Just trying to have fun with the last 200 lottery numbers and looking for that winning number.... lol

Thanks again

Hi Drrellik,
<strike></strike>
You're welcome and I'm glad to help.

Markmzz



Interesting that my solution, which is entirely the same as markmzz does not work? (BTA, I'm no MVP)

Hi Arthurbr,

Try this:

First, select the range S8:T16 (with S8 active in the end) and then put the CF.

After that, put the value 10 in U8.


RSTUV
7
881110
997
10104CF- =$S9=$U$8
111114
12121
13136
14147
151524
161610
17
********************************

<tbody>
</tbody>


And tell me the result.

Markmzz
 
Last edited:
Upvote 0
Arthurbr,

Yours does work after I changed the cell reference, the formula is basically the same I just did not understand what it was doing when I tried yours, both of you thank you for the help and now lets win the lottery.

~DR
 
Upvote 0

Forum statistics

Threads
1,215,447
Messages
6,124,906
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top