Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Highlighting a certain range of cells

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,A 66: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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlighting Holidays in a Range with dates Memento Excel Programming 4 June 1st 07 01:43 PM
Highlighting Range of Cells based on another cell with 5 condition Alex Excel Programming 6 November 10th 06 06:45 AM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM
Excel VBA Highlighting/selecting an unknown range of cells daniB[_3_] Excel Programming 2 January 22nd 04 05:59 PM
Stop Highlighting a Range Chris Gorham[_3_] Excel Programming 4 January 4th 04 04:43 PM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"