VBA Code, how to define range of found column header properly

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
44,521
Office Version
365
Platform
Windows
You filling the entire columns with a white background & then looping through the columns & checking if the background is NOT white.
As it will always be white, the inner loops never trigger.
Try stepping through the code with F8 & you will see that happening.
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,963
Messages
5,508,418
Members
408,685
Latest member
kyrendaniel

This Week's Hot Topics

Top