Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macros Help

Status
Not open for further replies.

Shift838

IS-IT--Management
Jan 27, 2003
987
US
I know I can use a macro to move columns in Excel. I was wondering if a Macro can be written to see if a column is blank and if it has no data and is blank if it can automatically hide the column. I need it to scan the entire spreadsheet. Is this possibe, and if so how can I get this done?

I was given the below, but was wondering what does the A:A signify?

if application.worksheetfunction.counta(range("A:A")) = 0 then
range("A:A").entirecolumn.hidden = true
end if
 

I gave you a complete solution in your other post. If you want it, all you have to do is go back and review the thread that you started.

"A:A" is a range reference that refers to column A. It is similar to a range reference such as "A1:B2" that refers to the upper-left-hand corner of the worksheet and consists of four cells.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top