grid me

Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
667
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am on a works rota & would like to run VB so each month when the rota comes out , I can place a 'grid' (double outside / thick line & line colour red) it will find my name and do this for me. The reason it must use me name , is becasue it depends of the number of other staff who are on the list too ( for example, july 22, I am in row 14, but in august22 I am now in row 35)
22
All the names start in col E:EJ.

I hope this maked sense...thank you
 
Ok .... ran into a "Subscript Out of Range" error.

Ran an "F8" check and discovered the following code line :

VBA Code:
' XXX Changed to xlPart was xlWhole
    Set rngFound = rng.Columns(1).Find(What:=findName, After:=rng.Cells(1, 1), LookIn:=xlFormulas2, _
                        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
                        MatchCase:=False, SearchFormat:=False)

.... has an undocumented VBA term "xlFormulas2" which began with Excel 2016. For pre-2016, if that term
is changed to xlFormulas the macro runs as intended.

Thank you for providing the file.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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