I think I have an idea, but I will need a little help trying to understand your exact needs can you possibly clarify? I will help you to the best of my abilities.
Christopher
I think I have an idea, but I will need a little help trying to understand your exact needs can you possibly clarify? I will help you to the best of my abilities.
Christopher:
Thanks for your reply,
There are numerous applications that made me ask
this question. Right now, I'm trying to create a
format for a table using VBA.
The idea is that I (or any user) selects an area,
presses a button and then you end up with the
format for the table (different color for headers,
additions formulas at the end of columns, etc.)
If I place some code like:
Selection.address
I end up with the address for the whole area, but
is there a way that I can have the address for
the first cell in the selection, or last cell?
Thanks for your time,
Regards!
jsp
Any of the following should locate the first cell in the selected range :-
Selection.Cells(1,1)
Selection.Item(1,1)
Selection (1,1)
Selection (1)
There is useful explanation at :-
http://www.cpearson.com/excel/cells.htm
Celia
Celia:
Thanks for your reply,
It's amazing how many things you can do with
Excel.
What you mention here is going to be very useful; now I can
make references within a range! Is it possible, though,
to find out what are the row and column for last cell in
a range;
I mean, I think you could write something like:
Rows =Range(Selection, Selection.End(xldown)).count
To know the last row, but is there a more direct way?
Sorry to bother again!
Thanks!
Celia: Thanks for your reply, It's amazing how many things you can do with
Rws = Selection.Rows.Count
Celia