D
danno-c
I have read all of the posts related to Copy & Paste macros and have not
found anything that answers my question.
I am trying to copy and paste different values within the same macro.
When I record the macro and then run it, the macro does not recognize the
value residing in the current clipboard, it only recognizes the previously
copied value. and I end up pasting the same value each time i run the macro.
I have recorded using relative and non-relative values and get the same
result with either one.
What I am physically doing (and have recorded) is as follows:
My workbook is made up of 3 worksheets: LISTING, DETAIL and SORT
Within the LISTING worksheet, I first locate the cell from which I will copy
the value by using F5 and entering a cell reference, I then copy that value
(Ctrl+C).
Then I move to the DETAIL worksheet (Ctrl+PgDn) to locate the value (that I
just copied from the LISTING worksheet) within the DETAIL worksheet
Open find dialog box (Ctrl+F) then paste the clipboard value into the find
dialog box (Ctrl+V) then Enter to find the value.
After the value is located, I close the search dialog box, highlight several
adjacent cells and copy them.
I then move to the SORT worksheet and past the values copied from the DETAIL
worksheet to the SORT worksheet.
I repeat this process several hundred times to build the SORT worksheet.
I inherited these massive workbooks and this process. I know the workbooks
could have been designed much better, but this is what I have to work with
and would appreciate any advice on how to record a macro to accomplish the
above steps.
I'm hoping this macro can be built by recording the keystrokes because I am
VBA illiterate.
Thanks, Dan
MS Office Professional Edition 2003 SP3
found anything that answers my question.
I am trying to copy and paste different values within the same macro.
When I record the macro and then run it, the macro does not recognize the
value residing in the current clipboard, it only recognizes the previously
copied value. and I end up pasting the same value each time i run the macro.
I have recorded using relative and non-relative values and get the same
result with either one.
What I am physically doing (and have recorded) is as follows:
My workbook is made up of 3 worksheets: LISTING, DETAIL and SORT
Within the LISTING worksheet, I first locate the cell from which I will copy
the value by using F5 and entering a cell reference, I then copy that value
(Ctrl+C).
Then I move to the DETAIL worksheet (Ctrl+PgDn) to locate the value (that I
just copied from the LISTING worksheet) within the DETAIL worksheet
Open find dialog box (Ctrl+F) then paste the clipboard value into the find
dialog box (Ctrl+V) then Enter to find the value.
After the value is located, I close the search dialog box, highlight several
adjacent cells and copy them.
I then move to the SORT worksheet and past the values copied from the DETAIL
worksheet to the SORT worksheet.
I repeat this process several hundred times to build the SORT worksheet.
I inherited these massive workbooks and this process. I know the workbooks
could have been designed much better, but this is what I have to work with
and would appreciate any advice on how to record a macro to accomplish the
above steps.
I'm hoping this macro can be built by recording the keystrokes because I am
VBA illiterate.
Thanks, Dan
MS Office Professional Edition 2003 SP3