Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 Gary Keramidas wrote: 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" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Circular Reference Problem Calculating Net Pay | Excel Worksheet Functions | |||
Calculating a cell reference | Excel Discussion (Misc queries) | |||
How can I remove cell reference when calculating outside of the pi | Excel Worksheet Functions | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |