+ Reply to Thread
Results 1 to 5 of 5

Thread: Rearrange Data

  1. #1
    Registered User
    Join Date
    12-08-2009
    Location
    India
    MS-Off Ver
    Excel 20037
    Posts
    8

    Rearrange Data

    Hi All,

    Please help me to get the desired result in the attached spreadsheet.

    Thanks in advance
    Madan
    Attached Files Attached Files

  2. #2
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,342

    Re: Rearrange Data

    Hi Try this macro out

    Sub RearrangeData()
        Dim MyRange As Range, Cell As Range
        
        Set MyRange = Range("D4:D179")
        Range("D4").Delete shift:=xlUp
        Application.ScreenUpdating = False
        For Each Cell In MyRange
            If Cell = vbNullString Then
                Range(Cell.Offset(0, -1).Address & ":" & _
                        Cell.Address).Delete shift:=xlUp
            End If
        Next Cell
        Application.ScreenUpdating = False
    End Sub
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Registered User
    Join Date
    12-08-2009
    Location
    India
    MS-Off Ver
    Excel 20037
    Posts
    8

    Re: Rearrange Data

    Thanks.
    But the macro doesn't seem to work properly.

    Is it possible to rearrange the data without using macros?

    Madan

  4. #4
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Rearrange Data

    Madan, please take the trouble to explain your issue in the text on the post, not only in the attachment. This will help our members decide whether they want to download the attachment or not.

    thanks.

  5. #5
    Registered User
    Join Date
    12-08-2009
    Location
    India
    MS-Off Ver
    Excel 20037
    Posts
    8

    Re: Rearrange Data

    Hi Teylyn,

    I have the existing data wherein ProductA(in cell B3) has two subproducts, namely ProductAA(in cell C4) and ProductAB(in cell C8).
    Again Product AA has multiple products(number of products will change everytime) which is specified in cells D5 to D7.

    I would like to rearrange my data in such a way that there is no blank cell next to ProductA(in Cell C3).
    The same holds good for ProductAA, ProductAB.

    I am not well versed with macros, hence, it would be better if i can use some excel functions to achieve this.

    Hope this clarifes my issue.

    Regards
    Madan

+ 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.2.0