ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sort, Copy, and Paste macro, must execute twice to work (https://www.excelbanter.com/excel-discussion-misc-queries/232015-sort-copy-paste-macro-must-execute-twice-work.html)

B. CLAY

Sort, Copy, and Paste macro, must execute twice to work
 
I have a spreadsheet that has 4 subjects. I have a macro set up to sort on
subject 1 and then paste to workbook A. 2nd macro sorts on Subj 2 and then
paste to workbook B. Then Subj. 3/workbook C, then Subj 4/workbook d.

First two macros work fine then when I do Macro C, the first line of the
sort in Macro B results is at the top of Subj 3 sort. Oddly if I then
execute Macro C again, it's corrected.

Something weird is going on? Any ideas?
By the way all these macros are set up under a single macro. IE CTRL-M,
executes MACRO A, B, C, D DOESN't work However, MACRO A, B, C, C, D DOES
work

FSt1

Sort, Copy, and Paste macro, must execute twice to work
 
hi
post your code.

regards
FSt1

"B. CLAY" wrote:

I have a spreadsheet that has 4 subjects. I have a macro set up to sort on
subject 1 and then paste to workbook A. 2nd macro sorts on Subj 2 and then
paste to workbook B. Then Subj. 3/workbook C, then Subj 4/workbook d.

First two macros work fine then when I do Macro C, the first line of the
sort in Macro B results is at the top of Subj 3 sort. Oddly if I then
execute Macro C again, it's corrected.

Something weird is going on? Any ideas?
By the way all these macros are set up under a single macro. IE CTRL-M,
executes MACRO A, B, C, D DOESN't work However, MACRO A, B, C, C, D DOES
work


Don Guillett

Sort, Copy, and Paste macro, must execute twice to work
 
ALWAYS!! post your code for comments and suggestions.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"B. CLAY" <B.
wrote in message
...
I have a spreadsheet that has 4 subjects. I have a macro set up to sort on
subject 1 and then paste to workbook A. 2nd macro sorts on Subj 2 and
then
paste to workbook B. Then Subj. 3/workbook C, then Subj 4/workbook d.

First two macros work fine then when I do Macro C, the first line of the
sort in Macro B results is at the top of Subj 3 sort. Oddly if I then
execute Macro C again, it's corrected.

Something weird is going on? Any ideas?
By the way all these macros are set up under a single macro. IE CTRL-M,
executes MACRO A, B, C, D DOESN't work However, MACRO A, B, C, C, D
DOES
work




All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com