Highlighting row titles according to ranged selection

rguid1

New Member
Joined
Nov 1, 2021
Messages
1
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
Hi All,

I am working on a leave/on call calendar. I want users to be able to highlight a single or range of cells, enter leave type and ctrl-enter fills all as expected. This works. The use can get lost in size of the sheet on not be certain if correct cells are selected.. I want to conditional format the cell titles to be highlighted according to the users ranged selection.

I can capture the ranged selections using the vba below and update a hidden cell on the page. output eg. $A$10:$C$10,$E$10:$I$10

VBA Code:
Sub mySelection()
Dim mySelection As String
  mySelection = selection.Address
Range("A43").Value = mySelection
End Sub

Using CF I am already highlighting the relevant Row title and Column title for the primary "selected cell" with formula =COLUMN()=CELL("col") and =ROW()=CELL("row") in each the column and row titles.

2 examples attached, one with what I have working and one with what I am after.

Any help appreciated!

Cheers
 

Attachments

  • example.png
    example.png
    133.2 KB · Views: 4
  • example2.png
    example2.png
    134.9 KB · Views: 4

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,214,784
Messages
6,121,536
Members
449,037
Latest member
tmmotairi

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