Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have two workbooks and am trying to copy the currency value (if entered) in
col B, in rows 19 - 57 only from the "Data Input" WS in WB "Daily Balance Today" and copy those values to the "Pending" WS in the "Pending and Short" WB into the next availabel cell in col C. This workbook is a running total so I need to add the information to the bottom of the spreadsheet. If values are copied, I need to copy the text from Col A and the date in Col D from the Data Input WS and copy that text to Col B in the Pending WS on the same row as the currency value. This code is not working for me and I'm not sure what is wrong. Thanks in advance for your assistance. Sub copydata() Dim rng As Range, rng1 As Range, rng2 As Range Dim rng3 As Range With Worksheets("Data Input") Set rng = .Range("B19:57").SpecialCells(xlConstants, xlTextValues) If Not rng Is Nothing Then Set rng1 = Intersect(rng.EntireRow, .Columns(1).Resize(, 4)) Set rng2 = Intersect(rng.EntireRow, .Columns(2)) Else Exit Sub End If End With Dim bk as Workbook set bk = Workbooks.Open(C:\Pending and Short Log\Pending and Short.xls") set rng3 = bk.Worksheets("Pending").Cells(Rows.Count, 2).End(xlUp)(2) rng1.Copy rng3.Offset(0, -1) rng2.Copy rng3.Offset(0, 2) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro trouble | Excel Discussion (Misc queries) | |||
MACRO TROUBLE | Excel Discussion (Misc queries) | |||
Excel macro & MS XP OS trouble | Excel Programming | |||
Having trouble with simple macro! | Excel Programming | |||
Macro trouble | Excel Programming |