Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Moving last info in column of worksheet to another in same workboo

Hi -
I am sure this is easy, but I am not savvy with macros and programming in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same workbook. I
also need to do that with the last amount (currency formatted) of a column.
There are blank cells in the column depending on weather or not there is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Moving last info in column of worksheet to another in same workboo

The following macro will copy the last entry in column B of Sheet1 to cell A1
in Sheet2:

Sub moveitover()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, "B").End(xlUp).Row
Cells(n, "B").Copy Sheets("Sheet2").Range("A1")
End Sub

you can get a similar result without VBA if you are willing to use a linking
formula rather than copy/paste.
--
Gary''s Student - gsnu200756


"sodat96" wrote:

Hi -
I am sure this is easy, but I am not savvy with macros and programming in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same workbook. I
also need to do that with the last amount (currency formatted) of a column.
There are blank cells in the column depending on weather or not there is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Moving last info in column of worksheet to another in same wor

Thanks! I didn't make myself clear in the 1st question. I have over 60
sheets in this workbook. Each sheet is a client. The 1st sheet in the
workbook is a listing of all the clients with their name and balance owed,
date payment due, and date of last payment and amount of last payment. date
of last payment and amount of last payment is what I want copied from the
individual clients sheet (I have a column for that in their sheet). I have
figured out how to make a formula to bring the balance due to the 1st sheet,
so now all I have to do is have it copy the last payment amount and date over
for each customer so I only have to enter it once. And that is the last item
entered in that column The 1st sheet is kind of like the report sheet for my
boss.

Thanks
--
sodat96


"Gary''s Student" wrote:

The following macro will copy the last entry in column B of Sheet1 to cell A1
in Sheet2:

Sub moveitover()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, "B").End(xlUp).Row
Cells(n, "B").Copy Sheets("Sheet2").Range("A1")
End Sub

you can get a similar result without VBA if you are willing to use a linking
formula rather than copy/paste.
--
Gary''s Student - gsnu200756


"sodat96" wrote:

Hi -
I am sure this is easy, but I am not savvy with macros and programming in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same workbook. I
also need to do that with the last amount (currency formatted) of a column.
There are blank cells in the column depending on weather or not there is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Moving last info in column of worksheet to another in same wor

Thanks. However, after re-reading my question I realize that I did not make
myself clear.
I have a workbook with about 100 sheets. The 1st one being what I will call
the balance owed sheet. The other sheets are the individual customer sheets.
With a date, invoice #, check #, inv. Amount, payment amt, and balance.
The 1st sheet list each client the balance owed, date payment due (never
changes), the date of last payment, last payment amount.
What I want to do is move the DATE of last payment (which is in the date
column of the client sheet) to the 1st sheet on the clients row in the column
for date of last payment. I also want to move the Payment Amount from the
clients sheet to the 1st sheet on the clients rose in the column for last
payment amount. I have already figured out how to move the balance (via a
formula). Can this be done with the same formula you gave me or is there
something else I have to do?

Thanks
--
sodat96


"Gary''s Student" wrote:

The following macro will copy the last entry in column B of Sheet1 to cell A1
in Sheet2:

Sub moveitover()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, "B").End(xlUp).Row
Cells(n, "B").Copy Sheets("Sheet2").Range("A1")
End Sub

you can get a similar result without VBA if you are willing to use a linking
formula rather than copy/paste.
--
Gary''s Student - gsnu200756


"sodat96" wrote:

Hi -
I am sure this is easy, but I am not savvy with macros and programming in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same workbook. I
also need to do that with the last amount (currency formatted) of a column.
There are blank cells in the column depending on weather or not there is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,480
Default Moving last info in column of worksheet to another in same wor

Hi

The following code assumes your 1st sheet is called Summary.
It clears all data from row 2 to 200, then loops through each sheet in turn,
extracting the Client name (from the sheet name), the Date of last payment,
the value of last payment and the current balance (including any invoices
added after the date of last payment.
It writes this information to successive rows in columns A:D of Summary
sheet.

Try this on a COPY of your data first, as it will wipe out any formulae that
you have already set up on your Summary sheet.

Dim wsd As Worksheet, ws As Worksheet
Dim lr As Long, i As Long

Application.ScreenUpdating = False
Set wsd = Sheets("Summary")
wsd.Rows("2:200").EntireRow.Delete
i = 2
For Each ws In Worksheets
If ws.Name < "Summary" Then
ws.Activate
lr = Cells(Rows.Count, "E").End(xlUp).Row
wsd.Cells(i, "A") = ActiveSheet.Name
wsd.Cells(i, "B") = ActiveSheet.Cells(lr, "A").Value
wsd.Cells(i, "C") = ActiveSheet.Cells(lr, "E").Value
lr = Cells(Rows.Count, "F").End(xlUp).Row
wsd.Cells(i, "D") = ActiveSheet.Cells(lr, "F").Value
i = i + 1
End If
Next
Application.ScreenUpdating = True
Sheets("Summary").Activate
End Sub

To copy the macro into your workbook, press Alt+F11 to bring up the Visual
Basic Editor.
Choose InsertModuleand copy the code into the white pane that appears.
Press Alt+F11 to return to your Spreadsheet.
To run the macro, press Alt+F8, highlight the macro name and choose Run

I have used letters for the columns rather than numbers, so you can easi;y
see which values to alter if you want the information placed in different
positions on your Summary sheet.
--
Regards
Roger Govier



"sodat96" wrote in message
...
Thanks. However, after re-reading my question I realize that I did not
make
myself clear.
I have a workbook with about 100 sheets. The 1st one being what I will
call
the balance owed sheet. The other sheets are the individual customer
sheets.
With a date, invoice #, check #, inv. Amount, payment amt, and balance.
The 1st sheet list each client the balance owed, date payment due (never
changes), the date of last payment, last payment amount.
What I want to do is move the DATE of last payment (which is in the date
column of the client sheet) to the 1st sheet on the clients row in the
column
for date of last payment. I also want to move the Payment Amount from
the
clients sheet to the 1st sheet on the clients rose in the column for last
payment amount. I have already figured out how to move the balance (via a
formula). Can this be done with the same formula you gave me or is
there
something else I have to do?

Thanks
--
sodat96


"Gary''s Student" wrote:

The following macro will copy the last entry in column B of Sheet1 to
cell A1
in Sheet2:

Sub moveitover()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, "B").End(xlUp).Row
Cells(n, "B").Copy Sheets("Sheet2").Range("A1")
End Sub

you can get a similar result without VBA if you are willing to use a
linking
formula rather than copy/paste.
--
Gary''s Student - gsnu200756


"sodat96" wrote:

Hi -
I am sure this is easy, but I am not savvy with macros and programming
in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same workbook.
I
also need to do that with the last amount (currency formatted) of a
column.
There are blank cells in the column depending on weather or not there
is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96





  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,480
Default Moving last info in column of worksheet to another in same wor

Sorry, copying the code I missed the first line

It should be

Sub CopyDatafromSheets()

Dim wsd As Worksheet, ws As Worksheet
Dim lr As Long, i As Long

Application.ScreenUpdating = False
Set wsd = Sheets("Summary")

wsd.Rows("2:200").EntireRow.Delete

i = 2
For Each ws In Worksheets
If ws.Name < "Summary" Then
ws.Activate
lr = Cells(Rows.Count, "E").End(xlUp).Row
wsd.Cells(i, 1) = ActiveSheet.Name
wsd.Cells(i, 2) = ActiveSheet.Cells(lr, 1).Value
wsd.Cells(i, 3) = ActiveSheet.Cells(lr, 5).Value
lr = Cells(Rows.Count, "F").End(xlUp).Row
wsd.Cells(i, 4) = ActiveSheet.Cells(lr, 6).Value
i = i + 1
End If
Next

Application.ScreenUpdating = True
Sheets("Summary").Activate
End Sub


--
Regards
Roger Govier



"Roger Govier" <rogerattechnology4NOSPAMu.co.uk wrote in message
...
Hi

The following code assumes your 1st sheet is called Summary.
It clears all data from row 2 to 200, then loops through each sheet in
turn, extracting the Client name (from the sheet name), the Date of last
payment, the value of last payment and the current balance (including any
invoices added after the date of last payment.
It writes this information to successive rows in columns A:D of Summary
sheet.

Try this on a COPY of your data first, as it will wipe out any formulae
that you have already set up on your Summary sheet.

Dim wsd As Worksheet, ws As Worksheet
Dim lr As Long, i As Long

Application.ScreenUpdating = False
Set wsd = Sheets("Summary")
wsd.Rows("2:200").EntireRow.Delete
i = 2
For Each ws In Worksheets
If ws.Name < "Summary" Then
ws.Activate
lr = Cells(Rows.Count, "E").End(xlUp).Row
wsd.Cells(i, "A") = ActiveSheet.Name
wsd.Cells(i, "B") = ActiveSheet.Cells(lr, "A").Value
wsd.Cells(i, "C") = ActiveSheet.Cells(lr, "E").Value
lr = Cells(Rows.Count, "F").End(xlUp).Row
wsd.Cells(i, "D") = ActiveSheet.Cells(lr, "F").Value
i = i + 1
End If
Next
Application.ScreenUpdating = True
Sheets("Summary").Activate
End Sub

To copy the macro into your workbook, press Alt+F11 to bring up the Visual
Basic Editor.
Choose InsertModuleand copy the code into the white pane that appears.
Press Alt+F11 to return to your Spreadsheet.
To run the macro, press Alt+F8, highlight the macro name and choose Run

I have used letters for the columns rather than numbers, so you can easi;y
see which values to alter if you want the information placed in different
positions on your Summary sheet.
--
Regards
Roger Govier



"sodat96" wrote in message
...
Thanks. However, after re-reading my question I realize that I did not
make
myself clear.
I have a workbook with about 100 sheets. The 1st one being what I will
call
the balance owed sheet. The other sheets are the individual customer
sheets.
With a date, invoice #, check #, inv. Amount, payment amt, and balance.
The 1st sheet list each client the balance owed, date payment due (never
changes), the date of last payment, last payment amount.
What I want to do is move the DATE of last payment (which is in the date
column of the client sheet) to the 1st sheet on the clients row in the
column
for date of last payment. I also want to move the Payment Amount from
the
clients sheet to the 1st sheet on the clients rose in the column for last
payment amount. I have already figured out how to move the balance (via
a
formula). Can this be done with the same formula you gave me or is
there
something else I have to do?

Thanks
--
sodat96


"Gary''s Student" wrote:

The following macro will copy the last entry in column B of Sheet1 to
cell A1
in Sheet2:

Sub moveitover()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, "B").End(xlUp).Row
Cells(n, "B").Copy Sheets("Sheet2").Range("A1")
End Sub

you can get a similar result without VBA if you are willing to use a
linking
formula rather than copy/paste.
--
Gary''s Student - gsnu200756


"sodat96" wrote:

Hi -
I am sure this is easy, but I am not savvy with macros and programming
in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same
workbook. I
also need to do that with the last amount (currency formatted) of a
column.
There are blank cells in the column depending on weather or not there
is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96





  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Moving last info in column of worksheet to another in same wor

Thanks so very much! This worked and will save me hours upon hours to time.
It is much appreciated. Happy Holiday Season!
--
sodat96


"Roger Govier" wrote:

Sorry, copying the code I missed the first line

It should be

Sub CopyDatafromSheets()

Dim wsd As Worksheet, ws As Worksheet
Dim lr As Long, i As Long

Application.ScreenUpdating = False
Set wsd = Sheets("Summary")

wsd.Rows("2:200").EntireRow.Delete

i = 2
For Each ws In Worksheets
If ws.Name < "Summary" Then
ws.Activate
lr = Cells(Rows.Count, "E").End(xlUp).Row
wsd.Cells(i, 1) = ActiveSheet.Name
wsd.Cells(i, 2) = ActiveSheet.Cells(lr, 1).Value
wsd.Cells(i, 3) = ActiveSheet.Cells(lr, 5).Value
lr = Cells(Rows.Count, "F").End(xlUp).Row
wsd.Cells(i, 4) = ActiveSheet.Cells(lr, 6).Value
i = i + 1
End If
Next

Application.ScreenUpdating = True
Sheets("Summary").Activate
End Sub


--
Regards
Roger Govier



"Roger Govier" <rogerattechnology4NOSPAMu.co.uk wrote in message
...
Hi

The following code assumes your 1st sheet is called Summary.
It clears all data from row 2 to 200, then loops through each sheet in
turn, extracting the Client name (from the sheet name), the Date of last
payment, the value of last payment and the current balance (including any
invoices added after the date of last payment.
It writes this information to successive rows in columns A:D of Summary
sheet.

Try this on a COPY of your data first, as it will wipe out any formulae
that you have already set up on your Summary sheet.

Dim wsd As Worksheet, ws As Worksheet
Dim lr As Long, i As Long

Application.ScreenUpdating = False
Set wsd = Sheets("Summary")
wsd.Rows("2:200").EntireRow.Delete
i = 2
For Each ws In Worksheets
If ws.Name < "Summary" Then
ws.Activate
lr = Cells(Rows.Count, "E").End(xlUp).Row
wsd.Cells(i, "A") = ActiveSheet.Name
wsd.Cells(i, "B") = ActiveSheet.Cells(lr, "A").Value
wsd.Cells(i, "C") = ActiveSheet.Cells(lr, "E").Value
lr = Cells(Rows.Count, "F").End(xlUp).Row
wsd.Cells(i, "D") = ActiveSheet.Cells(lr, "F").Value
i = i + 1
End If
Next
Application.ScreenUpdating = True
Sheets("Summary").Activate
End Sub

To copy the macro into your workbook, press Alt+F11 to bring up the Visual
Basic Editor.
Choose InsertModuleand copy the code into the white pane that appears.
Press Alt+F11 to return to your Spreadsheet.
To run the macro, press Alt+F8, highlight the macro name and choose Run

I have used letters for the columns rather than numbers, so you can easi;y
see which values to alter if you want the information placed in different
positions on your Summary sheet.
--
Regards
Roger Govier



"sodat96" wrote in message
...
Thanks. However, after re-reading my question I realize that I did not
make
myself clear.
I have a workbook with about 100 sheets. The 1st one being what I will
call
the balance owed sheet. The other sheets are the individual customer
sheets.
With a date, invoice #, check #, inv. Amount, payment amt, and balance.
The 1st sheet list each client the balance owed, date payment due (never
changes), the date of last payment, last payment amount.
What I want to do is move the DATE of last payment (which is in the date
column of the client sheet) to the 1st sheet on the clients row in the
column
for date of last payment. I also want to move the Payment Amount from
the
clients sheet to the 1st sheet on the clients rose in the column for last
payment amount. I have already figured out how to move the balance (via
a
formula). Can this be done with the same formula you gave me or is
there
something else I have to do?

Thanks
--
sodat96


"Gary''s Student" wrote:

The following macro will copy the last entry in column B of Sheet1 to
cell A1
in Sheet2:

Sub moveitover()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, "B").End(xlUp).Row
Cells(n, "B").Copy Sheets("Sheet2").Range("A1")
End Sub

you can get a similar result without VBA if you are willing to use a
linking
formula rather than copy/paste.
--
Gary''s Student - gsnu200756


"sodat96" wrote:

Hi -
I am sure this is easy, but I am not savvy with macros and programming
in
excel to figure this one out.
What I need to do is to take the last date entered in a column of one
worksheet and "copy" it to into another worksheet of the same
workbook. I
also need to do that with the last amount (currency formatted) of a
column.
There are blank cells in the column depending on weather or not there
is
information entered in that particular cell or not.

Any help would be appreciated. Thanks
--
sodat96






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
Excel Chart-data references link another worksheet in same workboo Wanda House Excel Discussion (Misc queries) 0 July 25th 07 03:40 PM
Update a column data with info from new worksheet BRB Excel Discussion (Misc queries) 3 November 21st 06 01:57 PM
IF function? Moving the same info from one worksheet to another. Naomi Excel Worksheet Functions 3 October 26th 06 07:46 PM
How do you perform lookups when the info is always moving? Jeze77 New Users to Excel 3 March 31st 06 03:42 PM
How do I copy a worksheet without the link to the original workboo Reliabengr Excel Discussion (Misc queries) 1 August 31st 05 01:17 AM


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