Highlighting a certain range of cells

S

Stav19

Hi All

I'm a beginner at using macros, and after playing around with
recording a bit, I came up with this something that enables me to copy
and paste values from one spreasheet to a new sheet, and highlight
certain cells. The problem is that going forward I don't want to have
to keep changing the macro (mainly as I'm not totally sure how!!!) if
the cells to be highlighted change. Is there any way around that? I
tried naming a range but didn't work, as the cells aren't all
following on from each other???

Sheets("Information").Select
Sheets.Add.Name = "Values"
Sheets("Information").Select
Range("Data_to_copy").Select
Selection.Copy
Sheets("Values").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:B").EntireColumn.AutoFit
Application.CutCopyMode = False
Sheets("Values").Select
Range("A19:B19").Select
Range("A19:B19,A37:B40,A42:B47").Select
Range("A42").Activate
Range("A19:B19,A37:B40,A42:B47,A49:B52").Select
Range("A49").Activate

Range("A19:B19,A37:B40,A42:B47,A49:B52,A54:B58,A60:B64,A66:B67,A69:B71,A73:B74"
_
).Select
Range("A73").Activate
ActiveWindow.SmallScroll Down:=23
Range( _

"A19:B19,A37:B40,A42:B47,A49:B52,A54:B58,A60:B64,A66:B67,A69:B71,A73:B74,A76:B76,A78:B79,A81:B83"
_
).Select
Range("A81").Activate
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
End With
Selection.Font.Bold = True
Sheets("Information").Select
Range("B2").Select

Any help would be appreciated!!!

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top