+ Reply to Thread
Results 1 to 4 of 4

Data arrangement

  1. #1
    Registered User
    Join Date
    11-17-2006
    Posts
    15

    Data arrangement

    Please help me for data arrangement as required.
    ColA ColB ColC ColD
    Ven_Code Ven_Name Narration Amount
    Doc No.
    101101 MAX INFOTECH
    55001 Purchase-Mouse 10000.00
    55002 Purchase-Keyboard 5000.00
    101102 TECH HARDWARE
    66001 Pur - SS Pipe 6mm 5000.00
    Data should be arrange as follows after processing any macros
    or other ms excel function.
    ColA ColB ColC ColD ColE
    Ven_Code Ven_Name Doc.No. Narration amount
    101101 MAX INFOTECH 55001 Purchase-Mouse 10000.00
    101101 MAX INFOTECH 55002 Purchase-Keyboard 5000.00
    101102 TECH HARDWARE 66001 Pur - SS Pipe 6mm 5000.00

    You are requested to please guide me for this. I am not knowing
    macros. I am very thankful to you if you help me.

    regards

    kpsrajput

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    Try this macro - it assumes that your vendor code starts with 101 - you'll need to edit it if it doesn't.

    Sub Test()
    Set DataRange = Range(Cells(2, 1), Cells(Cells(65536, 1).End(xlUp).Row, 1))
    For Each Cell In DataRange
    If Left(Cell, 3) = "101" Then
    CurrentVendorCode = Cell
    CurrentVendorName = Cell.Offset(0, 1)
    Else
    Cells(65536, 7).End(xlUp).Offset(1, 0) = CurrentVendorCode
    Cells(65536, 7).End(xlUp).Offset(0, 1) = CurrentVendorName
    Cells(65536, 7).End(xlUp).Offset(0, 2) = Cell
    Cells(65536, 7).End(xlUp).Offset(0, 3) = Cell.Offset(0, 1)
    Cells(65536, 7).End(xlUp).Offset(0, 4) = Cell.Offset(0, 2)
    End If
    Next Cell
    End Sub
    Martin

  3. #3
    Registered User
    Join Date
    11-17-2006
    Posts
    15

    Thumbs up data arrangement

    Dear Mr. Mrice,

    I am very thankful to you for your valuable guidance about macros. my task is running but some problem still there.

    my excel raw data having thousands vendor and this macros not going in ooping till all vendors completed. Also Amount column not merging.

    Can I sent you Excel file containg my whole data.

    I am very hungry about this task. Please help me.

    with warm regards

    kps rajput
    email: [email protected]

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by kushalprakash
    Dear Mr. Mrice,

    I am very thankful to you for your valuable guidance about macros. my task is running but some problem still there.

    my excel raw data having thousands vendor and this macros not going in ooping till all vendors completed. Also Amount column not merging.

    Can I sent you Excel file containg my whole data.

    I am very hungry about this task. Please help me.

    with warm regards

    kps rajput
    email: [email protected]
    Hi,

    Your problem is that you have not really specified how to determine row types that are to be removed from row types that are to be retained.

    IF (and only if) the determination is that A len = 6 is to be removed, and others are to be retained then
    Please Login or Register  to view this content.
    will do that for you.

    hth
    ---
    Last edited by Bryan Hessey; 11-19-2006 at 05:12 AM.
    Si fractum non sit, noli id reficere.

+ 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