Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Unique Values in a entire column, not just range | Excel Worksheet Functions | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
Can I set a variable to be equal to the range of an entire column? | Excel Programming | |||
If data in one column, take date, add 2 days, and turn the entire column a color... | Excel Discussion (Misc queries) | |||
how do i set an entire row or column to a range? | Excel Programming |