Hello,
Can 2 columns of cells be cut and pasted to next available empty cells in the same row using a macro? Can this be done at once with one macro or does it have to be done for each row?
Thanks,
Joe
Hello,
Can 2 columns of cells be cut and pasted to next available empty cells in the same row using a macro? Can this be done at once with one macro or does it have to be done for each row?
Thanks,
Joe
Maybe:
Please Login or Register to view this content.
Thanks John for replying. It does clear the contents but pastes them in columns J and K.
I am sorry for not being so clear. The contents from G and H need to stay on the same row and go into the next 2 empty cells in that row.
Could you maybe test it out in the file that is attached? I appreciate it very much.
Like this:
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Thank you for the reply Sintek. Unfortunately not exactly what I was after.
If there are entries in J and K, L and M, then the next available would be in N and O on the same row for example. J and K are just the starting points for the data to be pasted to.
Throughout the year this range will get filled and kept as a dynamic log.
Thank you for helping
Also if possible could the borders be kept in tact when clearing contents?
Hi LewisJ
Now I understand...Right the code works, however will need to sort out the borders part.
Please Login or Register to view this content.
Here you go amended code....
Please Login or Register to view this content.
Almost got it! When there were not any entries it moved it to I and J instead of J and K. Also if you can check the borders part it would be great thanks so much.
K this sorts out if empty.Not to sure about borders yet lol
Please Login or Register to view this content.
Yes now they stay on the correct row. If there aren't any entries it pastes to I instead of starting in column J.
K, here is final code.....Third time lucky.
Please Login or Register to view this content.
Still starting in column I instead of column J when there aren't any entries.
And so .......we learn......Done and dusted.
Please Login or Register to view this content.
Try:
Please Login or Register to view this content.
Brilliant!!!
Thank you very much for the fantastic help. So sorry it took so much of your time.
Take care,
Joe
Thanks John but it seems that Mr. sintek has a perfect solution.
You're welcome. Glad you got the desired result.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks