+ Reply to Thread
Results 1 to 12 of 12

Selecting multiple columns with merged cells

Hybrid View

  1. #1
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Selecting multiple columns with merged cells

    Here is a very generic way to check for hidden columns. Important to note is that it is only asking if column B is hidden. It would need to be amended to your criteria.
    Sub FindHidden()
        Dim Ws1 As Worksheet
        Set Ws1 = Worksheets("Sheet1")
        If Ws1.Cells(2, 2).EntireColumn.Hidden = True Then
            ''Do some code once you know if it is hidden
            MsgBox "Hidden"
        End If
    End Sub
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  2. #2
    Forum Contributor
    Join Date
    01-18-2010
    Location
    Bentley, NM
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Selecting multiple columns with merged cells

    Quote Originally Posted by Mordred View Post
    Here is a very generic way to check for hidden columns. Important to note is that it is only asking if column B is hidden. It would need to be amended to your criteria.
    Sub FindHidden()
        Dim Ws1 As Worksheet
        Set Ws1 = Worksheets("Sheet1")
        If Ws1.Cells(2, 2).EntireColumn.Hidden = True Then
            ''Do some code once you know if it is hidden
            MsgBox "Hidden"
        End If
    End Sub
    So, Cells(2,2) refers to cell B2 correct?

  3. #3
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Selecting multiple columns with merged cells

    Quote Originally Posted by maw230 View Post
    So, Cells(2,2) refers to cell B2 correct?
    Yes that is correct.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1