Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello
I have done very basic macros using "tools" and "record new macro". I need to create one that will delete some columns and hide others. How can I do this please? Many thanks. I am working on excel 2003. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Columns("H:J").Delete Columns("M:O").Hidden = True -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Pascale" wrote in message ... Hello I have done very basic macros using "tools" and "record new macro". I need to create one that will delete some columns and hide others. How can I do this please? Many thanks. I am working on excel 2003. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Brilliant It works! However, I want to be able to use this macro with all my
spreadsheets, can you please tell me how to not have this macro attached to a specific spreadsheet but be accessible to all spreadsheets opened or not? thanks. Pascale "Bob Phillips" wrote: Columns("H:J").Delete Columns("M:O").Hidden = True -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Pascale" wrote in message ... Hello I have done very basic macros using "tools" and "record new macro". I need to create one that will delete some columns and hide others. How can I do this please? Many thanks. I am working on excel 2003. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Do you mean sheets (within a workbook), or all workbooks in a folder?
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Pascale" wrote in message ... Brilliant It works! However, I want to be able to use this macro with all my spreadsheets, can you please tell me how to not have this macro attached to a specific spreadsheet but be accessible to all spreadsheets opened or not? thanks. Pascale "Bob Phillips" wrote: Columns("H:J").Delete Columns("M:O").Hidden = True -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Pascale" wrote in message ... Hello I have done very basic macros using "tools" and "record new macro". I need to create one that will delete some columns and hide others. How can I do this please? Many thanks. I am working on excel 2003. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Would you like to delete/hide any particular rows/columns? What is your
criteria for deleting/hiding? The macro below will delete all blank rows in a selected range, is that any good? Sub Deleteblankrows() Dim Rw As Range If WorksheetFunction.CountA(Selection) = 0 Then MsgBox "You didn't select a range", vbOKOnly Exit Sub End If With Application .Calculation = xlCalculationManual .ScreenUpdating = False Selection.SpecialCells(xlCellTypeBlanks).Select For Each Rw In Selection.Rows If WorksheetFunction.CountA(Selection.EntireRow) = 0 Then Selection.EntireRow.Delete End If Next Rw .Calculation = xlCalculationAutomatic .ScreenUpdating = True End With End Sub Mike "Pascale" wrote: Hello I have done very basic macros using "tools" and "record new macro". I need to create one that will delete some columns and hide others. How can I do this please? Many thanks. I am working on excel 2003. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combining Text from 2 Columns into 1 then Deleting the 2 Columns | Excel Worksheet Functions | |||
Hiding columns without usimg a macro | Excel Worksheet Functions | |||
hiding columns | Excel Discussion (Misc queries) | |||
Hiding Columns | Excel Discussion (Misc queries) | |||
Hiding columns | Excel Discussion (Misc queries) |