Thank you for your prompt reply, Bob.
Your script (adapted to my sheet and column) gives this formula:
=OFFSET(CXR!$I$18,0,0,190,1)
where 190 is indeed the last row of the table, but this table will eventually be longer, so it is not exactly a dynamic name.
I am only surprised not to find any COUNTA .
For example, one of the names that I defined manually could look like this:
=OFFSET(CXR!$I$18,0,0,COUNTA(CXR!$I:$I),1)
(In fact it is different because I need only the non zero values, but I want to keep it simple here)
But it is fine, you've set me on the right path , and I have been able to adapt the script to my need.
The other thing that I did not understand in the code was that « cl » object.
Why define it as an object and not as a range?
Thank you,
Louise
Le 2015-04-03 à 07:19, 'Bob Phillips' bob.phillips@dsl.pipex.com [ExcelVBA] <ExcelVBA@yahoogroups.com> a écrit :
__._,_.___
Posted by: =?iso-8859-1?Q?Louise_Gari=E9py?= <garilou@cgocable.ca>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar