Related:
- Copy non adj. cells from two sheets into one
- Sheets right to left - Guide
- Copy cells from one sheet to another - Guide
- Excel macro to create new sheet based on value in cells - Guide
- Based on the cell values in cells b77 - Excel Forum
- Excel compare two sheets - Guide
1 response
Ok, the above code has been done away with. My focus has shifted to putting the price one the second sheet if the macro finds the item on both sheets, and then multiplying the delta number by the price to find the financial adjustment. Here is what I'm working with now, this is probably alot easier than it appears to me, but this is a new technique for me...
Bascially the intent is for the value in column "L" of the "Price" worksheet to be copied to the "I" column on the "PUCLW" worksheet, then multiply them together and put the answer in column "J".
I'm currently researching on how to make the copy process cleaner, but when I run this, all that occurs is that a new column is inserted before the original "I" column and both columns are left blank.
Again, thank you in advance for any assistance you may be able to give me.
Chris
Sub ReconAdj() 'This macro compares the list of Warehouse inventory to the list of division inventory 'for the purpose of accounting for total financial adjustment from year end base-line 'counts Dim sh1 As Worksheet Dim sh2 As Worksheet Dim sh1row As Integer Dim sh2row As Integer Dim sh1col As Integer Dim sh2col As Integer Dim rng1ct As Range Dim rng2ct As Range Set sh1 = ActiveWorkbook.Sheets("Price") Set sh2 = ActiveWorkbook.Sheets("PUCLW") sh1row = sh1.Range("b" & Rows.Count).End(xlUp).Row sh1col = sh1.Range("b" & Columns.Count).End(xlToLeft).Column Set rng1ct = sh1.Range("b2").Resize(sh1row, sh1col) sh2row = sh2.Range("c" & Rows.Count).End(xlUp).Row sh2col = sh2.Range("c" & Columns.Count).End(xlToLeft).Column Set rng2ct = sh2.Range("c2").Resize(sh2row, sh2col) For Each row1 In rng1ct For Each row2 In rng2ct If row2 = row1 Then sh1.Range("L" & Rows.Count).Copy Destination:=Worksheets("PUCLW").Range("I" & Rows.Count).End(xlUp) sh2.Range("J" & Rows.Count).Value = sh2.Range("H" & Rows.Count) * sh2.Range("I" & Rows.Count) End If Next row2 Next row1 End Sub
Bascially the intent is for the value in column "L" of the "Price" worksheet to be copied to the "I" column on the "PUCLW" worksheet, then multiply them together and put the answer in column "J".
I'm currently researching on how to make the copy process cleaner, but when I run this, all that occurs is that a new column is inserted before the original "I" column and both columns are left blank.
Again, thank you in advance for any assistance you may be able to give me.
Chris