Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Auto Update a sheet through Macro

Hi,

I have Sheet 1 where the user enters the data of a particulra product,
Sheet 2 is linked to Sheet 1 with lot of formulas ( basically for
analysis). I link the Sheet 2 with sheet 1 through formulas. I dont
want to copy the formulas to the entire Sheet 2 since that will
increase the size.

Can anyone suggest me a Macro , Below is the steps for your
understanding

1) When user enters 10 new entries, the sheet 2 should copy the
formulas in the last row and extend the same to 10 rows ( this will
update the new data)

2) The macro shoudl apply the formula by copying the last row in sheet
2 and then paste the formulas only to the number of new updates in
Sheet 1.

Regards
Chetan J
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Update a sheet through Macro


What would be the ranges used? where will the entries be? all in the
same column?, where are the formulae that you want extending, sheet 1 or
sheet 2?

I don't understand your 2 points in point 1 you say "sheet2 should copy
the formula in the last row.....etc but in point 2 you say you want the
same formulae pasting to sheet1? can you clarify what it is you are
trying to achieve?

Chetu;444768 Wrote:
Hi,

I have Sheet 1 where the user enters the data of a particulra product,
Sheet 2 is linked to Sheet 1 with lot of formulas ( basically for
analysis). I link the Sheet 2 with sheet 1 through formulas. I dont
want to copy the formulas to the entire Sheet 2 since that will
increase the size.

Can anyone suggest me a Macro , Below is the steps for your
understanding

1) When user enters 10 new entries, the sheet 2 should copy the
formulas in the last row and extend the same to 10 rows ( this will
update the new data)

2) The macro shoudl apply the formula by copying the last row in sheet
2 and then paste the formulas only to the number of new updates in
Sheet 1.

Regards
Chetan J



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=123316

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Auto Update a sheet through Macro

the code below will add the rows add, clear the empty cells, and leave the
formulas

"Simon Lloyd" wrote:


What would be the ranges used? where will the entries be? all in the
same column?, where are the formulae that you want extending, sheet 1 or
sheet 2?

I don't understand your 2 points in point 1 you say "sheet2 should copy
the formula in the last row.....etc but in point 2 you say you want the
same formulae pasting to sheet1? can you clarify what it is you are
trying to achieve?

Chetu;444768 Wrote:
Hi,

I have Sheet 1 where the user enters the data of a particulra product,
Sheet 2 is linked to Sheet 1 with lot of formulas ( basically for
analysis). I link the Sheet 2 with sheet 1 through formulas. I dont
want to copy the formulas to the entire Sheet 2 since that will
increase the size.

Can anyone suggest me a Macro , Below is the steps for your
understanding

1) When user enters 10 new entries, the sheet 2 should copy the
formulas in the last row and extend the same to 10 rows ( this will
update the new data)

2) The macro shoudl apply the formula by copying the last row in sheet
2 and then paste the formulas only to the number of new updates in
Sheet 1.

Regards
Chetan J



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=123316


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Auto Update a sheet through Macro

The last code I gave put the new rows in front of the last row. this code
puts them after the last row. I usually like keeps the last row.

Sub AddRows()

LastRow = Range("A" & Rows.Count).End(xlUp).Row
For Count = 1 To 10
Rows(LastRow).Copy
Rows(LastRow).Insert
Next Count
LastCol = Cells(LastRow, Columns.Count) _
.End(xlToLeft).Column
For Colcount = 1 To LastCol
'if not a formula clear the cell
If Left(Cells(LastRow + 1, Colcount).Formula, 1) < "=" Then
Range(Cells(LastRow + 1, Colcount), _
Cells(LastRow + 10, Colcount)).ClearContents
End If
Next Colcount

End Sub


"Simon Lloyd" wrote:


What would be the ranges used? where will the entries be? all in the
same column?, where are the formulae that you want extending, sheet 1 or
sheet 2?

I don't understand your 2 points in point 1 you say "sheet2 should copy
the formula in the last row.....etc but in point 2 you say you want the
same formulae pasting to sheet1? can you clarify what it is you are
trying to achieve?

Chetu;444768 Wrote:
Hi,

I have Sheet 1 where the user enters the data of a particulra product,
Sheet 2 is linked to Sheet 1 with lot of formulas ( basically for
analysis). I link the Sheet 2 with sheet 1 through formulas. I dont
want to copy the formulas to the entire Sheet 2 since that will
increase the size.

Can anyone suggest me a Macro , Below is the steps for your
understanding

1) When user enters 10 new entries, the sheet 2 should copy the
formulas in the last row and extend the same to 10 rows ( this will
update the new data)

2) The macro shoudl apply the formula by copying the last row in sheet
2 and then paste the formulas only to the number of new updates in
Sheet 1.

Regards
Chetan J



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=123316


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Auto Update a sheet through Macro

On Aug 7, 1:14*pm, Simon Lloyd
wrote:
What would be the ranges used? where will the entries be? all in the
same column?, where are the formulae that you want extending, sheet 1 or
sheet 2?

I don't understand your 2 points in point 1 you say "sheet2 should copy
the formula in the last row.....etc but in point 2 you say you want the
same formulae pasting to sheet1? can you clarify what it is you are
trying to achieve?

Chetu;444768 Wrote:





Hi,


I have Sheet 1 where the user enters the data of a particulra product,
Sheet 2 is linked to Sheet 1 with lot of formulas ( basically for
analysis). I link the Sheet 2 with sheet 1 through formulas. I dont
want to copy the formulas to the entire Sheet 2 since that will
increase the size.


Can anyone suggest me a Macro , Below is the steps for your
understanding


1) When user enters 10 new entries, the sheet 2 should copy the
formulas in the last row and extend the same to 10 rows ( this will
update the new data)


2) The macro shoudl apply the formula by copying the last row in sheet
2 and then paste the formulas only to the number of new updates in
Sheet 1.


Regards
Chetan J


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:http://www.thecodecage.com/forumz/member.php?userid=1
View this thread:http://www.thecodecage.com/forumz/sh....php?t=123316- Hide quoted text -

- Show quoted text -


Hi Lloyd,

Sorry for the confusion,

Actually Sheet 1 is used by the user, But Sheet 2 is linked to Sheet
1, So Sheet 2 has formulas starting range from B12 to DN12 ( like
refering sheet1 and also some other formulas for analysis), I want a
macro which copies the B12 to DN12 row and pastes them in B13 to DN13,
once the formulas are copied, the formulas will automatically fetch
the data from Sheet 1.

But the problem is, If a user enters data in 10 new ros in Sheet1, The
same should reflect in Sheet2 ( I know i can copy paste the formulas,
but this method increases the file size ).


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Auto Update a sheet through Macro

'put this code in the sheet2 VBA page so when the sheet is selected the
formulas get updated

Private Sub Worksheet_Activate()
Sh2LastRow = Range("A" & Rows.Count).End(xlUp).Row

With Sheets("Sheet1")
Sh1LastRow = .Range("A" & Rows.Count).End(xlUp).Row
End With

If Sh1LastRow Sh2LastRow Then
Rows(Sh2LastRow).Copy _
Destination:=Rows(Sh2LastRow & ":" & Sh1LastRow)
End If
End Sub

"Chetan" wrote:

On Aug 7, 1:14 pm, Simon Lloyd
wrote:
What would be the ranges used? where will the entries be? all in the
same column?, where are the formulae that you want extending, sheet 1 or
sheet 2?

I don't understand your 2 points in point 1 you say "sheet2 should copy
the formula in the last row.....etc but in point 2 you say you want the
same formulae pasting to sheet1? can you clarify what it is you are
trying to achieve?

Chetu;444768 Wrote:





Hi,


I have Sheet 1 where the user enters the data of a particulra product,
Sheet 2 is linked to Sheet 1 with lot of formulas ( basically for
analysis). I link the Sheet 2 with sheet 1 through formulas. I dont
want to copy the formulas to the entire Sheet 2 since that will
increase the size.


Can anyone suggest me a Macro , Below is the steps for your
understanding


1) When user enters 10 new entries, the sheet 2 should copy the
formulas in the last row and extend the same to 10 rows ( this will
update the new data)


2) The macro shoudl apply the formula by copying the last row in sheet
2 and then paste the formulas only to the number of new updates in
Sheet 1.


Regards
Chetan J


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:http://www.thecodecage.com/forumz/member.php?userid=1
View this thread:http://www.thecodecage.com/forumz/sh....php?t=123316- Hide quoted text -

- Show quoted text -


Hi Lloyd,

Sorry for the confusion,

Actually Sheet 1 is used by the user, But Sheet 2 is linked to Sheet
1, So Sheet 2 has formulas starting range from B12 to DN12 ( like
refering sheet1 and also some other formulas for analysis), I want a
macro which copies the B12 to DN12 row and pastes them in B13 to DN13,
once the formulas are copied, the formulas will automatically fetch
the data from Sheet 1.

But the problem is, If a user enters data in 10 new ros in Sheet1, The
same should reflect in Sheet2 ( I know i can copy paste the formulas,
but this method increases the file size ).

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
auto update on seperate sheet ajitexcel Excel Worksheet Functions 1 June 7th 11 04:40 PM
Summary sheet auto update SUMMARY SHEET AUTO UPDATE FROM WORKBOOKS Excel Worksheet Functions 0 May 28th 09 01:49 PM
I need a payroll sheet that can auto update figures each week Sheila Excel Worksheet Functions 1 April 4th 06 07:56 PM
Auto Update Sheet Tab Karen Excel Worksheet Functions 3 May 16th 05 08:11 PM
auto update an open excel sheet over network, with mutiple users crumkerr Excel Worksheet Functions 1 November 29th 04 11:47 AM


All times are GMT +1. The time now is 06:30 AM.

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

About Us

"It's about Microsoft Excel"