Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Paul
 
Posts: n/a
Default Getting data from another worksheet

Hi,
I have an ever expanding excel sheet listing transactions. New ones are
added to the bottom of the list. In the row cells will show name, address,
value etc etc.
I want to have another worksheet that picks up the name, address, value etc
and put it into a layout that will be used to authorise the transaction.
In this new sheet I could use "=spreadsheet name A 121" to pick up the data
in cell A121. However, that would mean setting up new formulae every time a
new transaction went onto the original sheet. I want to be able to enter the
row number,121, once in the new spreadsheet, in cell A1 say, and then have
the spreadsheet pick up all the relevant cells on row 121. When a new
transaction went on I would simply key in 122 in cell A1 and it would produce
all the data for row 122.

Thanks for looking, any good ideas would be much appreciated.

Paul
  #2   Report Post  
Bruno Campanini
 
Posts: n/a
Default Getting data from another worksheet

"Paul" wrote in message
...
Hi,
I have an ever expanding excel sheet listing transactions. New ones are
added to the bottom of the list. In the row cells will show name, address,
value etc etc.
I want to have another worksheet that picks up the name, address, value
etc
and put it into a layout that will be used to authorise the transaction.
In this new sheet I could use "=spreadsheet name A 121" to pick up the
data
in cell A121. However, that would mean setting up new formulae every time
a
new transaction went onto the original sheet. I want to be able to enter
the
row number,121, once in the new spreadsheet, in cell A1 say, and then have
the spreadsheet pick up all the relevant cells on row 121. When a new
transaction went on I would simply key in 122 in cell A1 and it would
produce
all the data for row 122.

Thanks for looking, any good ideas would be much appreciated.

Paul


Try this:
=====================================
Sub Button45_Click()
Dim SourceRange As Range, TargetRange As Range
Dim LastWrittenRow As Range, RowToCopy

' Definitions
' --------------------------------
Set SourceRange = [Sheet10!A1]
Set TargetRange = [Sheet2!A280]
' --------------------------------

RowToCopy = InputBox("Row To Copy")
If Not IsNumeric(RowToCopy) Then Exit Sub
Set LastWrittenRow = TargetRange.End(xlDown)

' Copies entire row
'SourceRange.Offset(RowToCopy - 1, 0).EntireRow.Copy
'TargetRange.Offset(LastWrittenRow.Row - TargetRange.Row + 1, 0). _
PasteSpecial xlPasteValues

' Copies one cell only
TargetRange.Offset(LastWrittenRow.Row - TargetRange.Row + 1, 0) = _
SourceRange.Offset(RowToCopy - 1, 0)

End Sub
==========================

Ciao
Bruno


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
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
Saving data in a worksheet within a workbook Homeuser Excel Discussion (Misc queries) 2 August 21st 05 10:49 PM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Macro to search for and display data in another worksheet Mark H Excel Worksheet Functions 0 June 14th 05 12:40 PM
URGENT Please... new worksheet with copied formats but no data. DarrellK Excel Worksheet Functions 2 December 1st 04 07:11 PM


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