Replaces row instead of next avail
Closed
lost
-
Jan 18, 2012 at 12:35 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 19, 2012 at 01:45 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 19, 2012 at 01:45 AM
Related:
- Replaces row instead of next avail
- Saints row 2 cheats - Guide
- How to delete a row in a table in word - Guide
- Saints row free download - Download - Action and adventure
- Vba last non empty row - Guide
- Vba change row color - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 19, 2012 at 01:45 AM
Jan 19, 2012 at 01:45 AM
the macro works but does not give the answer you want.
when writing codes I suggest you have number of msgbox(s) so that you can easily debug and finally you can always remove these msbox(s)
suppose A7 is "a"
then your macro finds there is not "a" sheet and it creates a new sheet and calls it "a' and then copie form surce file the row 7 to row 1 of sheet1
you if condition is
that is if worksheets("A") exists
you have already created a sheet and called it "a" that means that answer to if condition is "yes" .
so the row 7 is copied to A1 row
where is the chance of "else" coming in
perhaps I am confused.
first time the pasting is done on the first row of new sheets
second time you run the macro now sheet("a") exist and "else" condition will come into effect and 7th row is pasted to second row.
everytime you run macro this will happen? Is this what you want
there is some confusion here. will you please explain the logic step by step so that the macro can be modified.
when writing codes I suggest you have number of msgbox(s) so that you can easily debug and finally you can always remove these msbox(s)
suppose A7 is "a"
then your macro finds there is not "a" sheet and it creates a new sheet and calls it "a' and then copie form surce file the row 7 to row 1 of sheet1
you if condition is
If Not Worksheets(rngCell.Text).Name <> "" Then
that is if worksheets("A") exists
you have already created a sheet and called it "a" that means that answer to if condition is "yes" .
so the row 7 is copied to A1 row
where is the chance of "else" coming in
perhaps I am confused.
first time the pasting is done on the first row of new sheets
second time you run the macro now sheet("a") exist and "else" condition will come into effect and 7th row is pasted to second row.
everytime you run macro this will happen? Is this what you want
there is some confusion here. will you please explain the logic step by step so that the macro can be modified.