How to Highlight an Additional Column without Referencing Specific Cells

CJBills

New Member
Joined
Apr 27, 2015
Messages
13
I'm attempting to highlight an array plus an additional, empty (or partially empty) column to the right of the highlighted array.

I'm using "Range(Selection, Selection.End(xlToRight)).Select" to highlight the data.
A
B
C
1
Data
Data
No Data
2
Data
Data
No Data
3
No Data
No Data
No Data

<TBODY>
</TBODY>

The code must not include specified cells; each month the number of rows may change. Currently, the macro recorder auto-inputs the above code, then "Range(C1:C2).Select" in the following line.

Any suggestions?

I have tried "Range(Selection, Selection.End(xlToRight)).Offset(0, 1).Select". This seems to shift the entire highlighted array range, causing an omission of the first column, which needs to be included in the highlight.
A
B
C
1
Data
Data
No Data
2
Data
Data
No Data
3
No Data
No Data
No Data

<TBODY>
</TBODY>

Thank you in advance.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try:
Code:
Range(Selection, Selection.End(xlToRight)).Resize(1, Range(Selection, _
        Selection.End(xlToRight)).Columns.Count + 1).Select
 
Upvote 0

Forum statistics

Threads
1,216,773
Messages
6,132,643
Members
449,739
Latest member
tinkdrummer

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