Calculating a cell reference

H

HalB

I have a sheet named Query that contains data extracted from a web page.
Now I need to copy the data into the proper cells in the Master sheet.

The scenario is to
A: Determine 1st empty row in Master! (=COUNTA(Master!A1:Master!A100)+1).
B: 1st column contains a number that has to be incremented by one for
each new vehicle. (=Max(Master!A2:A100)+1)).
C: Create a macro to copy the data on a cell by cell basis as the layout
of the Query sheet does not match the Master sheet.

The problem I am having is how to reference the 1st empty row in the
master using the results from step A.

IAW, I would want to find that row xx is the 1st empty row, xxx is the
next vehicle number, move to the Master sheet Axx, set the value of it
to xxx then start copying the appropriate cells from Query to Master.

Thanks,

HalB
 
G

Gary Keramidas

you can try something like this:

dim ws as worksheet
dim lastrow as long
set ws = worksheets("Master")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
ws.range("A" & lastrow +1).value = "your value"
 
H

HalB

Whoa, I may be in the wrong group <g>. I am just getting started on
macros and am not into VBA yet.

What I had hoped to do was find a way 'go to' a specific cell in the
Master sheet using a calculated value but I can't find a way to 'say'
A(Contents of another cell). Is that not possible without programming?

Thanks!

HalB
 

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

Top