![]() |
|
#10
|
|||
|
|||
|
Quote:
To use your code I have to manually go into every header first and remove the carriage return so that your code can find header "items" and "no." The header actually looks like this: ------- items sheet ------- and ------- no. sheet ------- What's the best way to deal with the carriage return that's forcing the words "sheet" to wrap down to the next line in the header cell? Code:
ICol = Range("1:1").Find("Items", LookAt:=xlWhole).Column
NCol = Range("1:1").Find("No.", LookAt:=xlWhole).Column
'Check if column numbers were found
If ICol = 0 Then
MsgBox ("Cannot find the term 'Items' in Row 1." & vbLf & "Please update and try again.")
The headers in question are always the 2nd and 3rd column on row 9. It's ok if it replaces the header with a comma too. Just as long as I can remove the carriage returns on their entire column that would be fine. Like this example below: e.g., Start at row 9 <pre> col1 col2 col3 ---- ------- ------- Pos. Items No. sheet sheet ---- ------- ------- </pre> and from there remove carriage and replace with comma. <pre> col1 col2 col3 ---- -------------- ----------- Pos. Items,sheet No.,sheet ---- ------------- ----------- </pre> |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
stop carriage return or enter key in a table
|
Alaska1 | Word | 1 | 01-14-2013 08:48 AM |
Coding into a macro a carriage return
|
sinbad | Word VBA | 6 | 02-27-2012 03:51 AM |
Paragraph (carriage) return font size
|
revrossreddick | Word | 2 | 12-28-2011 01:33 PM |
| Carriage Return Help | UCHelp | Word | 1 | 04-04-2010 10:11 PM |
Table of contents, remove spacing and put in 2 columns - need help urgently!
|
nam085 | Word | 1 | 03-04-2010 08:00 AM |