Using excel VBa, I can count last row of data using lastrow =
Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
But how to use it for column?
Using excel VBa, I can count last row of data using lastrow =
Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
But how to use it for column?
lastcol=Worksheets("Spare2").cells(rows.count,1).end(xltoleft).column
HTH
--
AP
"crapit" <[email protected]> a écrit dans le message de news:
[email protected]...
> Using excel VBa, I can count last row of data using lastrow =
> Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
> But how to use it for column?
>
Worksheets("Spare2").Cells(1,Columns.count).End(xlToLeft).Column
for the last column in the first row
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"crapit" <[email protected]> wrote in message
news:[email protected]...
> Using excel VBa, I can count last row of data using lastrow =
> Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
> But how to use it for column?
>
>
IT works!
"Bob Phillips" <[email protected]> wrote in message
news:%[email protected]...
> Worksheets("Spare2").Cells(1,Columns.count).End(xlToLeft).Column
>
> for the last column in the first row
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "crapit" <[email protected]> wrote in message
> news:[email protected]...
>> Using excel VBa, I can count last row of data using lastrow =
>> Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
>> But how to use it for column?
>>
>>
>
>
didnt work
"Ardus Petus" <[email protected]> wrote in message
news:%[email protected]...
> lastcol=Worksheets("Spare2").cells(rows.count,1).end(xltoleft).column
>
> HTH
> --
> AP
>
> "crapit" <[email protected]> a écrit dans le message de news:
> [email protected]...
>> Using excel VBa, I can count last row of data using lastrow =
>> Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
>> But how to use it for column?
>>
>
>
Typed too fast!
"crapit" <[email protected]> a écrit dans le message de news:
%[email protected]...
> didnt work
> "Ardus Petus" <[email protected]> wrote in message
> news:%[email protected]...
>> lastcol=Worksheets("Spare2").cells(rows.count,1).end(xltoleft).column
>>
>> HTH
>> --
>> AP
>>
>> "crapit" <[email protected]> a écrit dans le message de news:
>> [email protected]...
>>> Using excel VBa, I can count last row of data using lastrow =
>>> Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
>>> But how to use it for column?
>>>
>>
>>
>
>
But how doI get the actual column "R" value?
"Bob Phillips" <[email protected]> wrote in message
news:%[email protected]...
> Worksheets("Spare2").Cells(1,Columns.count).End(xlToLeft).Column
>
> for the last column in the first row
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "crapit" <[email protected]> wrote in message
> news:[email protected]...
>> Using excel VBa, I can count last row of data using lastrow =
>> Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
>> But how to use it for column?
>>
>>
>
>
myVal = Worksheets("Spare2").Cells(1,Columns.count).End(xlToLeft)
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Bob Phillips" <[email protected]> wrote in message
news:%[email protected]...
> Worksheets("Spare2").Cells(1,Columns.count).End(xlToLeft).Column
>
> for the last column in the first row
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "crapit" <[email protected]> wrote in message
> news:[email protected]...
> > Using excel VBa, I can count last row of data using lastrow =
> > Worksheets("Spare2").Cells(Rows.count, 1).End(xlUp).row
> > But how to use it for column?
> >
> >
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks