Senin, 16 April 2012

Re: [ExcelVBA] Request for Guidance

 

Thanks, Dwight. yep, that finds the last row, but the problem I'm
having is integrating that into a copy/paste routine that copies the
formulas from two cells (A2:B2) all the way to the last occupied row for
those columns.

thanks
Doc

On 4/15/2012 6:52 PM, Dwight Pearson wrote:
>
> I'm no expert and am still using Excel 2003 but couldn't you determine
> the last row used by
>
> LastRow = Range("D65536").End(xlUp).Row
>
> Dwight Pearson
> --- On Sun, 4/15/12, Dave 'Doc' Corio <dcorio@zitomedia.net
> <mailto:dcorio%40zitomedia.net>> wrote:
>
> From: Dave 'Doc' Corio <dcorio@zitomedia.net
> <mailto:dcorio%40zitomedia.net>>
> Subject: Re: [ExcelVBA] Request for Guidance
> To: ExcelVBA@yahoogroups.com <mailto:ExcelVBA%40yahoogroups.com>
> Date: Sunday, April 15, 2012, 10:44 AM
>
>
>
> Well, I'm ready to admit that I don't know NEAR as much as I
> thought I did! A few years ago, this would (might) have been fairly easy
> - but even given good directions, I can't seem to get this concept to
> work.
>
> David, you're absolutely right. I don't really care what is the
> last row of data, as long as I can copy the formulas in Ax:Bx all the
> way to the end. To save processing time, I'd be happy copying from
> somewhere near the end (i.e. A5500:B5500) to the last row.
>
> Sorry if I led folks to believe that I actually have a clue lol!!
>
> Thanks
> Doc
>
> On 4/15/2012 10:31 AM, David Lanman wrote:
> >
> > Hi Doc,
> >
> > I am not sure you really need to know what has been added, but you do
> > need to know what the last "Data" entry row is. Knowing the last row
> > you can copy from A2:B2 down to the last row, overwriting the existing
> > formulas would not matter, I assume.
> > Range(A2:B2).copy
> > Range Paste (A & LastRow: B & LastRow)
> >
> > Would that work? You can find last row GoTo Special LastCell.
> >
> > Thanks,
> > David
> >
> >
> > ________________________________
> > From: Doc <dcorio@zitomedia.net <mailto:dcorio%40zitomedia.net>
> <mailto:dcorio%40zitomedia.net>>
> > To: ExcelVBA@yahoogroups.com <mailto:ExcelVBA%40yahoogroups.com>
> <mailto:ExcelVBA%40yahoogroups.com>
> > Sent: Saturday, April 14, 2012 1: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]
> >
> >
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>

[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