I have placed 5 lines of info in a comment and need to extract only line three.
Can anybody help me please, I'm a new user and will appreciate help as a dummy
Thank you
Vic
I have placed 5 lines of info in a comment and need to extract only line three.
Can anybody help me please, I'm a new user and will appreciate help as a dummy
Thank you
Vic
Last edited by DonkeyOte; 03-10-2011 at 05:39 AM. Reason: modified title slightly
Hi,
Where have you placed the comment?
If it's in a macro just remove the ' sign before the commented line.
Steffen Thomsen
Assuming the comment (A1 in ex.) has line breaks you can Split the comment accordingly and use the (2) item [0 based Array], eg:
you may want to add Error handler accordingly![]()
Please Login or Register to view this content.
Last edited by DonkeyOte; 03-10-2011 at 05:41 AM. Reason: added note re: 0 based
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thank you DonkeyOte, I know that is what I wanted.
I have written as follows:
Then I get the message:![]()
Please Login or Register to view this content.
"Object variable or with block not set"
Can you help me with that please and thank you
Vic
Last edited by DonkeyOte; 03-10-2011 at 07:04 AM. Reason: added code tags
Vic, please always encase VBA code with CODE tags (per Forum Rules)
You would get the error you describe if the ActiveCell does not contain a Comment - this was the point I was making re: adding an appropriate handler.
with the above - if the cell is comment-less or contains fewer than three distinct lines then RmNo variable will be a Null string![]()
Please Login or Register to view this content.
Obviously when you refer to "comment" I have assumed you're referring to cell comments and not just a text string within the cell itself.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks