Error in Code

  • Thread starter Thread starter Julie
  • Start date Start date
J

Julie

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
 
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.
 
Back
Top