From: Mathew on
I have a very large range, say A3 to AD97. Within this data, there needs to
be additional data added weekly. What I want to do is add the data, via a
macro, that will add the data on the row and in the last column of data plus
1.
lastcoll = Cells(3, Columns.Count).End(xlToLeft).Column this gives me the
last column with data in row 3, but I have data in cells beyond AD, so how
do I have this code work for the entire Range(a3, AD97) .
I tried:

dim r as range
r = Range(a3, AD97) , this line gives me run time error 1004,

Also, I have 94 unique names in column A. How would I find the row number
within this range A3:A97 like Jacmel?

Any help would be greatly appreciated!

From: מיכאל (מיקי) אבידן on
This might help:
LR = ActiveSheet.UsedRange.Rows.Count
LC = ActiveSheet.UsedRange.Columns.Count
and so, Cells(LR, LC) is the lest cell in the used range
Micky


"Mathew" wrote:

> I have a very large range, say A3 to AD97. Within this data, there needs to
> be additional data added weekly. What I want to do is add the data, via a
> macro, that will add the data on the row and in the last column of data plus
> 1.
> lastcoll = Cells(3, Columns.Count).End(xlToLeft).Column this gives me the
> last column with data in row 3, but I have data in cells beyond AD, so how
> do I have this code work for the entire Range(a3, AD97) .
> I tried:
>
> dim r as range
> r = Range(a3, AD97) , this line gives me run time error 1004,
>
> Also, I have 94 unique names in column A. How would I find the row number
> within this range A3:A97 like Jacmel?
>
> Any help would be greatly appreciated!
>