Excel VBA - select just a particular column when some cell in the column is part of a merged cells range

When I select with Macro Recorder, it properly selects the column and returns code like:


However, when I run this in a subroutine, it ends up selecting a much larger area encompassing every column in a merged cells range (F8:K8 are merged).

How can I get the behavior I get when I do it manually in Excel.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sorry to be the bearer of bad news, but it seems, from all my researching that there is no noce way around this one.
The only slution people have come up with is unmerging the cells then re-merging them again once you've selected them.

Have a look at the following thread:

Hope this helps (somewhat) or maybe some guru out there has a solution that hasn't been posted yet.

Good luck

  i am sorry, but i agree with origfla. I tried every possible method but none seems to be working.  You will have to go into unmerging and remerging the cells to do what u want.

Jorge PaulinoIT Pro/DeveloperCommented:
Agree with all comments above, but why do you need to select the row ?

You can do everything without select it, like:

Range("F:F").Font.Bold = True
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

jnash67Author Commented:
I have a big report with groupings.  I am printing a custom report by hiding all the extraneous columns.  I am trying to automate the hiding of some columns and then the unhiding.
Jorge PaulinoIT Pro/DeveloperCommented:
But you can hide without select.

 Range("F:F").EntireColumn.Hidden = True

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jnash67Author Commented:
Solves my problem. Thx.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.