LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Trying to copy data from one workbook to another

Hi

I want to copy the daily post over to the issue, receipt, or overdue workbooks depending on which column the postal figure has been entered into. I was trying to use a button on the issue sheet, it doesn't like Range("A & LoopNo").Select and trying to get the R1C1 to change as needed.

Can you help please?

Thanks

Wendy

Sub PosttoIssue()
Dim Rowcounter As Integer 'No of entered rows
Dim LoopNo As Integer 'Loop value
Dim RefPaymt As String
Dim RefName As String


Windows("post.xls").Activate
'Application.Sheets("W1 Mon").Range("G1").Select
'ActiveCell.FormulaR1C1 = "=COUNTA(r[1]c[-5]:r[19]c[-5])" ' counts no of entered rows between B2:B20
Rowcounter = Application.Sheets("W1 Mon").Range("G1").Value 'get No of rows value store it in rowcounter

For LoopNo = 2 To Rowcounter

'c=cell

For Each c In Worksheets("W1 Mon").Range("D" & LoopNo)
If c 0 Then
Worksheets("W1 Mon").Range("A" & LoopNo, "B" & LoopNo).Select

Selection.Cut
Windows("Issue.xls").Activate

Range("A & LoopNo").Select
Windows("Issue.xls").Activate

RefPaymt = "R"& LoopNo &"C1"
RefName ="R" & LoopNo & "C2"
ActiveCell.FormulaR1C1 = _
"='[POST.xls]W1 Mon'! RefPaymt &"" ""&'[POST.xls]W1 Mon'! Refname"
End If 'c0

Next c
Next LoopNo
 
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
Copy data from Workbook Alpha & reorganize it in Workbook Bravo u473 Excel Programming 1 October 31st 07 02:37 AM
1.Open workbook. 2 copy data. 3 replace data. 4 save workbook. Cristobalitotom Excel Programming 0 July 6th 06 12:24 AM
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook burl_rfc Excel Programming 1 April 1st 06 08:48 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
Selecting data from 1 workbook to copy and paste to a 2nd workbook JackSpam Excel Programming 2 July 20th 05 02:33 AM


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