Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Andrew
 
Posts: n/a
Default finding a particular cell in another worksheet whose row number ch

Hi I'm new to macros. I've been trying to make a workbook that I can use at
work to track the progress of numerous projects. I have created a master
copy which will be modified for several different projects. When milestones
are reached the owner of the projects records this in the sheet in a colum
named "Done". This is compared to another column called "planned" and a
percentage can be made called "adherance to planned" This is then tracked for
each month for each ROW, (as each row will represent a new component of the
project).

In another sheet I devised a formatted repot to summaris the data. I got
this working, even made a macro to do it, But my problem is in worksheet 1,
extra lines will be added/deleted and the cell reference for the SUM of the
rows above will constantly have a different row address (same column). I
would like to up date my macro so that it copies a range of cells at the
bottom of my spreadsheet.

Any ideas would be appreciated.
--
agibson

--
agibson
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I like to pick out a column that always has info in it if the row is used. Then
use that to determine the rows to copy.

For instance:

dim LastRow as long
dim fwks as worksheet
dim twks as worksheet
dim rngtocopy as range
dim destcell as range

set fwks = workbooks("otherworkbook.xls").worksheets("Sheet1" )
set twks = workbooks("summaryworkbook.xls").worksheets("Sheet 1")

with fwks
lastrow = .cells(.rows.count,"A").end(xlup).row
'skip the header in row 1 and copy through column F
set rngtocopy = .range("A2:F" & lastrow)
end with

set destcell = twks.cells(.rows.count,"A").end(xlup).offset(1,0)

rngtocopy.copy _
destination:=destcell


==========
And if you put your formula in row 1 (always visible with windows|freeze panes),
you could just use the rest of the column:

=sum(B3:B65536)

And never worry about that address.


Andrew wrote:

Hi I'm new to macros. I've been trying to make a workbook that I can use at
work to track the progress of numerous projects. I have created a master
copy which will be modified for several different projects. When milestones
are reached the owner of the projects records this in the sheet in a colum
named "Done". This is compared to another column called "planned" and a
percentage can be made called "adherance to planned" This is then tracked for
each month for each ROW, (as each row will represent a new component of the
project).

In another sheet I devised a formatted repot to summaris the data. I got
this working, even made a macro to do it, But my problem is in worksheet 1,
extra lines will be added/deleted and the cell reference for the SUM of the
rows above will constantly have a different row address (same column). I
would like to up date my macro so that it copies a range of cells at the
bottom of my spreadsheet.

Any ideas would be appreciated.
--
agibson

--
agibson


--

Dave Peterson
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
Conversion of Cell Contents into a Functional Worksheet name ? GMJT Excel Worksheet Functions 1 August 21st 05 04:59 PM
update cell in other worksheet based... mwrfsu Excel Worksheet Functions 0 August 19th 05 05:22 PM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
Why can't I link a cell from worksheet to another when it has an . FV Excel Worksheet Functions 0 April 7th 05 06:33 PM
How can I link a cell in one worksheet to a cell in another works. EWI_Guy Excel Worksheet Functions 3 April 5th 05 09:15 PM


All times are GMT +1. The time now is 06:01 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"