![]() |
identifying the character represented by a square box
Hi all How can I identify the character code for a square box into the following line of code? Range("D3:D" & LastRow).value = "=IF(LEN(A3)=0,IF(LEFT(A4,1)="","Keep as divider","DELETE"),IF(LEFT(A3,10)="principal:","St art of message","Contains info"))" Currently this line results in the VBE error "invalid character" & I am hoping to incorporate it into the string by using something like its character code. Is this possible? background info: This is part of a larger collection of macros that work together to allow me to filter & search historical emails (in a text file) after my company swaps from Lotus Notes to Outlook. I hope to be able to provide this to work colleagues for their use as well. Column A contains the text from the messages & the character visually represented by the square box appears to be the divider between email trails & so I have offset it by one row eg "A4" cf "A3". This box would not copy into a formula, but was able to copy it into a cell & build the formula around it. Any suggestions are greatly appreciated, Rob Brockett NZ Always learning & the best way to learn is to experience... -- broro183 ------------------------------------------------------------------------ broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068 View this thread: http://www.excelforum.com/showthread...hreadid=530477 |
identifying the character represented by a square box
I believe, and I may be wrong here, but the box represents some sort o carriage return/enter type key stroke. You can emulate this in vb by using using the intrinsic constan 'vbcrlf'. Apologies if this isnt what you need, I didnt read the whole post -- MattShoreso ----------------------------------------------------------------------- MattShoreson's Profile: http://www.excelforum.com/member.php...nfo&userid=347 View this thread: http://www.excelforum.com/showthread.php?threadid=53047 |
identifying the character represented by a square box
Hi Matt, Thanks for your suggestion, but it appears I posted too soon! I just needed to sit back & look at the line of code to solve my problem - it lay in my use of single sets of apostrophes in my string rather than double sets, ie compare the dud code: Range("D3:D" & LastRow).value = "=IF(LEN(A3)=0,IF(LEFT(A4,1)=" ","Keep as divider","DELETE"),IF(LEFT(A3,10)="principal:","St art of message","Contains info"))" with working code: Range("D3:D" & LastRow).Value = "=IF(LEN(A3)=0,IF(LEFT(A4,1)="""",""Keep as divider"",""DELETE""),IF(LEFT(A3,10)=""principal:" ",""Start of message"",""Contains info""))" Once again, thanks for the prompt response, Rob Brockett NZ Always learning & the best way to learn is to experience... -- broro183 ------------------------------------------------------------------------ broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068 View this thread: http://www.excelforum.com/showthread...hreadid=530477 |
All times are GMT +1. The time now is 10:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com