View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Calculating a cell reference

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"

--


Gary


"HalB" wrote in message
...
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