Show Hidden Column A and B

MikeL

Active Member
Joined
Mar 17, 2002
Messages
473
Office Version
  1. 2013
Platform
  1. Windows
Hello,

I ran a macro to unhide all columns (which produces the screen shot below)

Problem is the view I see still shows the first column as 'C'. How can I change this view to show columns A and B?


TEMPLATE JUN10 VS JUN09_KV.xlsm
CDEF
1categorydescription
2revenueRoyalties
3expensesRent
variances +-50k (2)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

MikeL

Active Member
Joined
Mar 17, 2002
Messages
473
Office Version
  1. 2013
Platform
  1. Windows
Thanks, the cursor goes there but it still shows the same view.
Any ideas?

Mike
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,456
Have those columns been re-sized (even if by accident) to be too narrow to see?
Try setting the column width to see.
Code:
Range("A:B").ColumnWidth = 10

Hope it helps.
 

MikeL

Active Member
Joined
Mar 17, 2002
Messages
473
Office Version
  1. 2013
Platform
  1. Windows
Thanks HalfAce and VoG.

Both solutions ended with the same issue. The cursor ended in Column A but only Col C was visible. I couldn't resize the columns to show A and B either.

Here is what ended up working ....
I Selected All in the worksheet, copied and pasted to a blank worksheet in the WB and all is now visible.

Still not sure if there is a better way but this ended up working for me.

Mike
 

Nalani

Well-known Member
Joined
Apr 10, 2009
Messages
1,047
Incorporate this in your code.

Code:
Sub test()
With Sheets(1)
    .Columns("A:C").EntireColumn.Hidden = False
End With
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,575
Messages
5,832,576
Members
430,142
Latest member
ivonsurf123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top