Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Calculating a cell reference

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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Calculating a cell reference

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Circular Reference Problem Calculating Net Pay Gerard Excel Worksheet Functions 5 August 18th 06 02:15 AM
Calculating a cell reference DeanGriffith01 Excel Discussion (Misc queries) 1 December 19th 05 11:01 AM
How can I remove cell reference when calculating outside of the pi Doit Excel Worksheet Functions 0 October 3rd 05 05:31 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


All times are GMT +1. The time now is 03:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"