View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Debra Ann Debra Ann is offline
external usenet poster
 
Posts: 5
Default Select Cell Range

Thanks to both of you.

--
Debra Ann


"Duke Carey" wrote:

Several ways. Is all the data in one contiguous range? Are there any other
cells in the sheet you DON'T want to select? Does it always come into Excel
using the same top left cell?

Assume it always comes in in a contigous range, staring in A1, then use

activesheet.range("a1").currentregion.select

Having said this - you don't need to select a range in order to act on it.
You could just do this

Sub Fmt()
Dim rng As Range
Set rng = ActiveSheet.Range("a1").CurrentRegion
With rng
.Font.Bold = True
.Interior.ColorIndex = 5
End With
End Sub





"Debra Ann" wrote:

I have some raw data in a spreadsheet that came from another software. I
want to have a macro select all the cell range that contains information in
it so that I can have the macro format the fonts, cell frames, etc. How do I
have it search and select the columns and rows that contain the data?


--
Debra Ann