G
Guest
The function below works in conjunction with a worksheet_change event and
some logic to scan various regions of the sheet to see exactly where the
change took place. Once I have that information, I simply need to pass it
the row number in a loop and grab the entire block of data that is revelant
to that particular change.
For example, A1:M15 as a range.
Since theres a significant number of these inventory blocks I want to copy
them to the Ready for Review sheet which then gets emailed automatically. I
am able to accurately copy the particular range, and even get it to the
destination correctly - but it only works on the Destination if the Range for
that is something like Range("A1"). This is confusing since the
Range(Cells(my_row,1)) works fine for selecting the range. Do I need to pass
it the actual size of the range when using Cells, or is there another way to
achieve this without setting Destination to "A1" or some other cell
reference, but by using Row # and Column #?
Thanks,
F. Eetch.
'************************
'************************
Function Report_Changes(my_row, my_dest_row)
Sheets("Inventory").Range(Cells(my_row, 1), Cells(my_row + 14, 13)).Copy _
Destination:=Sheets("Ready for Review").Range(Cells(my_dest_row,
1))
Worksheets("Ready For Review").Columns("A:Z").AutoFit
End Function
some logic to scan various regions of the sheet to see exactly where the
change took place. Once I have that information, I simply need to pass it
the row number in a loop and grab the entire block of data that is revelant
to that particular change.
For example, A1:M15 as a range.
Since theres a significant number of these inventory blocks I want to copy
them to the Ready for Review sheet which then gets emailed automatically. I
am able to accurately copy the particular range, and even get it to the
destination correctly - but it only works on the Destination if the Range for
that is something like Range("A1"). This is confusing since the
Range(Cells(my_row,1)) works fine for selecting the range. Do I need to pass
it the actual size of the range when using Cells, or is there another way to
achieve this without setting Destination to "A1" or some other cell
reference, but by using Row # and Column #?
Thanks,
F. Eetch.
'************************
'************************
Function Report_Changes(my_row, my_dest_row)
Sheets("Inventory").Range(Cells(my_row, 1), Cells(my_row + 14, 13)).Copy _
Destination:=Sheets("Ready for Review").Range(Cells(my_dest_row,
1))
Worksheets("Ready For Review").Columns("A:Z").AutoFit
End Function