Minggu, 15 April 2012

Re: [ExcelVBA] Request for Guidance

 

Welcome,

What I would probably do is, rather than try and determine
how many rows are added each time, keep track of the
amount of rows in a cell somewhere, a hidden sheet even. A
lot of times I've used that strategy, make a hidden page and
name it "variables" or something so that you can refer to it in
worksheet functions or VBA code.

When running the code, I would then check the cell and see
where the code should start looking for new records (rows),
then use code to count down and find out how many need to
be updated. I'd update the cell with the count to the new
count, then code it to copy A and B formulas for as many as
needed.

I'm sure there are numerous approaches to this, it's just a
matter of finding which method works most efficiently for you.

But, that's about what I would do.

G.

________________________________
From: Doc <dcorio@zitomedia.net>
To: ExcelVBA@yahoogroups.com
Sent: Saturday, April 14, 2012 4:58 PM
Subject: [ExcelVBA] Request for Guidance


 
Greetings to the group from a new member! Name is Doc in north-central PA.

It's been a long time and several versions since I worked with VBA, and I'm finding myself a little lost. Okay - a LOT lost!

I don't want someone to just write this for me - I would like a little help steering in the right direction.

In Excel 2007 I have a data sheet consisting of several thousand lines of data from a database. The first two columns (A & B) are formulas that determine items from the rows of data. Column C is empty. When the data is refreshed, there may be anywhere from 1 to 25 new rows of data added.

The VBA I've been trying (and failing) to work would do the following:

Determine how many new rows of data were added (data starts in column D)
and
copy the formulas from the last existing cells A & B to the new rows.

Very much appreciate any help with this
Thanks!
Doc

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar