Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Error in Code

Hi! Can someone please help me with my code? I have
tried every possible way (I know) to get this to work and
I am I completely frustrated. I am using the code for a
summary page. My page varies everytime I import
information so I want to use 'LastRow' in my code because
I want the code to go to the last row of a certain column
and use that value. I am going to try to explain as much
as I can. I have 3 columns on my summary page.

Column A is blank and to be used for calculations
(percentage)
Column B has descriptions in it (all text)
Column C has numeric valuesin it. It is used for cost
for the description in Column B.

A B C

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Error in Code

The following code returns the row number of the last row containing data in the B column:

LastRow = Cells(Rows.Count, "B").End(xlUp).Row

Note that xlUp contains the letter L in lower case, not the numeral one.

--

John Green - Excel MVP
Sydney
Australia


"Julie" wrote in message ...
Hi! Can someone please help me with my code? I have
tried every possible way (I know) to get this to work and
I am I completely frustrated. I am using the code for a
summary page. My page varies everytime I import
information so I want to use 'LastRow' in my code because
I want the code to go to the last row of a certain column
and use that value. I am going to try to explain as much
as I can. I have 3 columns on my summary page.

Column A is blank and to be used for calculations
(percentage)
Column B has descriptions in it (all text)
Column C has numeric valuesin it. It is used for cost
for the description in Column B.

A B C



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error with code terilad Excel Discussion (Misc queries) 4 April 12th 10 06:20 PM
error in code des-sa[_2_] Excel Discussion (Misc queries) 5 July 3rd 08 08:09 AM
Why Im I getting an error in code.. N.F[_2_] Excel Discussion (Misc queries) 10 August 8th 07 02:50 AM
Error in Code N.F[_2_] Excel Discussion (Misc queries) 9 June 27th 07 06:48 PM
Error code=2 Derek[_5_] Excel Programming 1 October 14th 03 12:41 PM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"