![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Detroit
Posts: 792
|
When I do a select A:A in VB and there are some columns that were merged, I end up selecting too much.
How can I restrict the select to the "original" A:A ? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi UHsoccer,
You can't make Excel display, select or operate on only part of a cell. Once cells are merged they effectively become one cell in this sense. In order to get Excel to select just part of a merged cell that is in column A, you must first unmerge the cell. If you are trying to do this via a macro, I suggest you just add code to unmerge all the merged cells that fall both inside and outside of the column A, perform your desired operation on column A, then re-merge the cells. This can all be done in VBA. Just be aware that any operation you perform on the contents of any part (sub-cell) of a merged cell only "takes" if it is performed on the first (top left) cell in the range.
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|