last non-blank

  • Thread starter Thread starter johann
  • Start date Start date
J

johann

I have a macro which refresh a web query in sheet Quotes,
and copy/paste these values in Data. how would you
suggest a better way to have macro paste values in the
last non-blank cell? I am using a row named DayColumn
(B2) to tell macro what column to paste values.

Thanks
 
Johann
row named DayColumn ? Row ? Column ??

Anyway ...

Dim LastRow As Long
Range("B65536").End(xlUp).Offset(1,0).Row

Regards

Trevor
 
Hi,

rows and columns are vary since the webquery copies many
lines to the Data sheet. The data sheet keeps a
historical record of what the webquery returns. I want
to have the macro paste values in the last non blank
cells in Data
 
You could use the special cell xlEnd that will allow you to set a
variable that is the end cell (same as pressing ctrl + end) then you can
add +1 to make sure you are one row below.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top