PC Review


Reply
Thread Tools Rate Thread

Calculating a cell reference

 
 
HalB
Guest
Posts: n/a
 
      18th Mar 2007
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
 
Reply With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      18th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:iweLh.18329$(E-Mail Removed)...
>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



 
Reply With Quote
 
HalB
Guest
Posts: n/a
 
      18th Mar 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating a cell reference =?Utf-8?B?RGVhbkdyaWZmaXRoMDE=?= Microsoft Excel Misc 1 19th Dec 2005 11:01 AM
How can I remove cell reference when calculating outside of the pi =?Utf-8?B?RG9pdA==?= Microsoft Excel Worksheet Functions 0 3rd Oct 2005 05:31 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. twister212atop@yahoo.com Microsoft Excel Worksheet Functions 2 11th Dec 2004 12:05 AM
Calculating cell to equal a certain number (circular reference help) SupraLB Microsoft Excel Worksheet Functions 3 17th Oct 2003 11:18 PM
Automatically calculating an absolute cell reference Matt Yackel Microsoft Excel Misc 1 6th Oct 2003 11:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:47 PM.