Conditional Format Selected Cell

Pacman52

Active Member
Joined
Jan 29, 2009
Messages
401
Office Version
  1. 365
Platform
  1. Windows
Just out of interest is it possible to format a cell when a user clicks in it to enter a value and once they move to the next relevant cell the formatting goes.

Basically, I designing a 'form' on a worksheet and want to highlight whatever cell the user clicks and is entering a value in, (so that its obvious what information is required in a particular cell).

I've already locked all the other cells.

Logically I'm thinking this must be achievable and if it is what would the CF formula be?

Thanks for any replies. Paul
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Wow that has to be the quickest response ever !!

Thanks so much, Joe I'll have a read through the link you provided.
 
Upvote 0
Ok so that sub obviously works the way it is intended to but it doesn't do what I'm after which is to highlight whatever cell a user has selected. I tried to play around with the code and adjust it, which sort of worked until I locked some cells.

I did a bit of a search online and came across this formula to use with conditional formatting which works although the CF only applies as soon as something has been typed in the a cell.

Excel Formula:
=AND(ROW()=CELL("row"),COLUMN()=CELL("col"))

Any ideas on anything I could change in the formula to make it work when a cell is actually selected?

Thanks Paul
 
Upvote 0
Solution
No, I do not know of any way to do it with Conditional Formatting. I don't know if it is possible.

Ok so that sub obviously works the way it is intended to but it doesn't do what I'm after which is to highlight whatever cell a user has selected
That code should do PRECISELY that, highlights whatever cell you select.

I tried to play around with the code and adjust it, which sort of worked until I locked some cells.
When you protect your sheet, check the option to allow them to change the format of cells, and it should work:
1730992558803.png
 
Upvote 0
Thanks so much for the replies and the tip on protecting a worksheet and a tick in Format Cells. I've never really noticed at all the options on this list but now you've highlighted it, I can see myself using some of them later.

The CF formula I posted earlier does actually do what I was trying to achieve now, I only had the issue whilst testing it on the actual sheet I was working on but as soon as I went to another sheet and then back to the 'test' sheet the CF formula worked perfectly.

Thanks again though for your help and advice.

Paul
 
Upvote 0
You are welcome.
Glad you were able to get something that works like you want!
 
Upvote 0

Forum statistics

Threads
1,223,579
Messages
6,173,170
Members
452,504
Latest member
frankkeith2233

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