LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Looking for a way to Set Range to Entire Column

Here is my code

Sub Temp()
Dim R
'Set ColA = ActiveSheet.Range("A1:A65536")
Set ColA = ActiveSheet.Columns(1).EntireColumn


For Each R In ColA
If R.Text = "" Then
endrow = R.Row - 1
Exit For
End If
Next
MsgBox endrow
End Sub

The first line I have rem'ed out was what I originally was using and it does
work for this code however I was hoping that I could do the same thing by
using just a column reference to set my range for the rest of my code but
when I use the second line after the rem'ed out line it doesn't return the
same as my original line of code. Can I use somthing like the second line of
my code or do I have to use the first one to set my range ?

Dan Thompson
 
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
Count Unique Values in a entire column, not just range Brian Excel Worksheet Functions 10 May 16th 09 08:48 PM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
Can I set a variable to be equal to the range of an entire column? robs3131 Excel Programming 4 June 5th 07 03:14 AM
If data in one column, take date, add 2 days, and turn the entire column a color... [email protected] Excel Discussion (Misc queries) 6 August 24th 06 03:58 AM
how do i set an entire row or column to a range? strataguru[_13_] Excel Programming 7 December 25th 03 04:08 AM


All times are GMT +1. The time now is 10:30 AM.

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"