SandsB
Well-known Member
- Joined
- Feb 13, 2007
- Messages
- 705
- Office Version
- 365
- Platform
- Windows
Cell B1 has text like this:
3/1/23: Pending patient results blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
3/2/23: Results negative
3/4/23: Final results blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
blah, blah, blah, blah, blah, blah, blah, blah, blah
Cell A1 has similar text:
3/6/23: Completed
The text for each date may be a few characters or some small paragraphs.
I need a macro that'll move the text in A1 to the bottom (or top) of B1 retaining the separate lines by date (They were originally put there with an Alt-Enter) - and then clear the contents of A1. When I do this, with a simple concatenate in my macro, it removes the line breaks so all the text runs together and is no longer separated by date.
This is just for row 1. To make it more interesting, I need to assign the macro to a button on each row (I know how to do that) and take the above action for the row the button is on (I don't know that part) so one small macro works and I don't have to copy it 500 times for 500 rows of data. I don't see a way to let the macro know which line the button is on.
3/1/23: Pending patient results blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
3/2/23: Results negative
3/4/23: Final results blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah,
blah, blah, blah, blah, blah, blah, blah, blah, blah
Cell A1 has similar text:
3/6/23: Completed
The text for each date may be a few characters or some small paragraphs.
I need a macro that'll move the text in A1 to the bottom (or top) of B1 retaining the separate lines by date (They were originally put there with an Alt-Enter) - and then clear the contents of A1. When I do this, with a simple concatenate in my macro, it removes the line breaks so all the text runs together and is no longer separated by date.
This is just for row 1. To make it more interesting, I need to assign the macro to a button on each row (I know how to do that) and take the above action for the row the button is on (I don't know that part) so one small macro works and I don't have to copy it 500 times for 500 rows of data. I don't see a way to let the macro know which line the button is on.