+ Reply to Thread
Results 1 to 4 of 4

Inserting number of rows based on a count of data

Hybrid View

  1. #1
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Inserting number of rows based on a count of data

    Sub Insert_Columns()
        Dim num As String
        num = InputBox("How many columns do you want to insert?")
        If num <> "" Then
            If num > 0 Then ActiveCell.Offset(0, 1).Resize(1, num).EntireColumn.Insert
        End If
    End Sub

  2. #2
    Registered User
    Join Date
    08-15-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Inserting number of rows based on a count of data

    Hi patel,

    That's a great code and will be useful. But for the current file, I'm looking for it to count the number of cells with data and insert twice the number of columns. I'm looking to have as few manual inputs as possible.

    Thanks.

+ 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