+ Reply to Thread
Results 1 to 12 of 12

Organizing/Summing Data

  1. #1
    Forum Contributor
    Join Date
    05-02-2014
    Location
    United States
    MS-Off Ver
    Excel 365
    Posts
    205

    Organizing/Summing Data

    Hello, I am looking for help on this spreadsheet.

    The ISO Entry tab is for manual data entry.

    On the Line # tab, I would like all of the information from the ISO Entry tab relisted where any lines that have the same Area Code, Plan Code, System Code, Pipe Size, and Insulation Thickness; The information under Straight Pipe, 90's/45's, Misc, Valves, Flanges is summed up and shown as 1 line item instead of multiple line items.

    On the Pipe Size tab, I would like the information listed where any line that has the same Pipe Size and Insulation Thickness; The information under Straight Pipe, 90's/45's, Misc, Valves, Flanges is summed up and shown as 1 line item instead of multiple line items.

    Let me know if you have any questions and thanks for the help!
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Organizing/Summing Data

    Try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 06-22-2018 at 05:57 PM. Reason: Clear Destinations & Improve Code
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this ‼


    Another way :

    PHP Code: 
    Sub Demo1()
        
    Dim CN%, R&, K$, V
            C 
    = [{0,0,0;"A:E","A:J","G:K";"D:E","D:J","D:H"}]
        For 
    2 To 3
            Worksheets
    (N).Cells(1).Value "¤"
            
    Worksheets(N).UsedRange.Offset(1).Clear
        Next
             Application
    .ScreenUpdating False
        With Worksheets
    (1).UsedRange.Rows
            
    For 2 To .Count
                
    For 2 To 3
                        K 
    Join(Application.Index(.Item(R).Columns(C(N1)).Value10), "¤")
                        
    Application.Match(KWorksheets(N).UsedRange.Columns(1), 0)
                    If 
    IsError(VThen
                        V 
    Worksheets(N).UsedRange.Rows.Count 1
                        Worksheets
    (N).Cells(V1).Value K
                       
    .Item(R).Columns(C(N2)).Copy Worksheets(N).Cells(V2)
                    Else
                        
    Worksheets(N).UsedRange.Rows(V).Columns(C(N3)).Address(External:=True)
                        
    Range(K).Value Evaluate(.Item(R).Columns("F:J").Address(External:=True) & "+" K)
                    
    End If
                
    Next
            Next
        End With
             Worksheets
    (2).UsedRange.Columns(1).Clear
             Worksheets
    (3).UsedRange.Columns(1).Clear
             Application
    .ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Organizing/Summing Data


    Thanks for the rep' Orrin !

    My way is easier to understand for a beginner and can work under Windows or either with a MAC.

    Showboat, for big data and only under Windows the Dictionary way (or VBA Collection for PC & MAC) is faster to execute …
    Last edited by Marc L; 06-23-2018 at 06:11 AM.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Organizing/Summing Data

    Just for the fun of it...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool A Collection variation …


    sintek your code well works but to avoid duplicates it needs to manually clear the result worksheets before running it …

    A variation of my previous code using Collections (as Dictionary) instead of columns to store keys :

    PHP Code: 
    Sub Demo2()
         
    Dim CR&, N%, K$, Dic(2 To 3) As New Collection
             C 
    = [{0,0,0;"A:E","A:J","F:J";"D:E","D:J","C:G"}]
             
    Worksheets(2).UsedRange.Offset(1).Clear
             Worksheets
    (3).UsedRange.Offset(1).Clear
             Application
    .ScreenUpdating False
             On Error Resume Next
        With Worksheets
    (1).UsedRange.Rows
            
    For 2 To .Count
                
    For 2 To 3
                        K 
    Join(Application.Index(.Item(R).Columns(C(N1)).Value10), "¤")
                        
    Dic(N).Add Dic(N).Count 2K
                    
    If Err.Number Then
                        K 
    Worksheets(N).UsedRange.Rows(Dic(N)(K)).Columns(C(N3)).Address(External:=True)
                        
    Range(K).Value Evaluate(.Item(R).Columns("F:J").Address(External:=True) & "+" K)
                        
    Err.Clear
                    
    Else
                       .
    Item(R).Columns(C(N2)).Copy Worksheets(N).Cells(Dic(N).Count 12)
                    
    End If
                
    Next
            Next
        End With
             Erase Dic
             Application
    .ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Organizing/Summing Data

    @ Marc L
    Yes, true...
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    05-02-2014
    Location
    United States
    MS-Off Ver
    Excel 365
    Posts
    205

    Re: Organizing/Summing Data

    Thanks everyone! Could you incorporate a "RUN" button on the ISO Entry tab in the upper left corner?

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Organizing/Summing Data

    Developer...Insert...Choice of Form Control or Active X control
    If form control...Assign Code
    If Active X paste code into CommandButton_Click()

  10. #10
    Forum Contributor
    Join Date
    05-02-2014
    Location
    United States
    MS-Off Ver
    Excel 365
    Posts
    205

    Re: Organizing/Summing Data

    Thanks! I have a second spreadsheet that I was hoping you could help with. Same idea as this spreadsheet; only the ISO Entry tab has a different way of displaying information. See attached.

    On the ISO tab, the row that looks like this "3"-SC2500-Q-CS02-2" is the Line Number. Everything above that is the information for that line number.

    The Line Number tells us 4 things. Area Code, Plan Code, System Code, and Insulation Thickness. I would like an entry table to be able to tell the program where each of those are located in the Line Number.

    Example:
    Area Code = Q or A or etc.
    Plan Code = SC or SH or CW or etc.
    System Code = 2554 or 2835 or etc.
    Insulation thickness = First number from the right (so 2" in above Line Number - or sometimes it will say 2EG at the end where 2 is still the thickness)

    If the value under the "Size" column is "#x#", then I would like it displayed as the larger number.

    For the columns 90s, Misc, Valves, Flanges, 45s - you will need to search for keywords under the Description Column on ISO tab. I would like a table where I can tell the program what to look for under each. Up to 10 different words under each column.

    Example:
    90s = 90
    Misc = Tee, Reducer, Stubend
    Valves = Valve, Expansion Joint
    Flanges = Flanges
    45s = 45

    I would like 1 more entry table where I can Enter in the Plan Code and then enter in a color, and all of those lines are then highlighted that color. EX: CW = Blue

    Thanks for the help!!
    Attached Files Attached Files
    Last edited by showboat; 07-16-2018 at 11:31 AM.

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Organizing/Summing Data

    I suggest you open a new thread...

  12. #12
    Forum Contributor
    Join Date
    05-02-2014
    Location
    United States
    MS-Off Ver
    Excel 365
    Posts
    205

    Re: Organizing/Summing Data

    Thanks sintek. I will start a new thread.

    Could you add a 45s column to each tab in this worksheet to function the same way?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Organizing RAW Data
    By MetaGod in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2018, 08:57 PM
  2. need help organizing this data
    By AceRockolla in forum Excel General
    Replies: 4
    Last Post: 01-12-2018, 10:55 PM
  3. Organizing data
    By JNambi in forum Excel General
    Replies: 1
    Last Post: 01-15-2016, 03:21 PM
  4. Need Help Organizing Data
    By The_Signal in forum Excel General
    Replies: 4
    Last Post: 07-01-2014, 02:03 AM
  5. Organizing Data
    By kremark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-08-2014, 05:13 PM
  6. [SOLVED] Help with organizing data
    By Eaglered in forum Excel General
    Replies: 2
    Last Post: 05-18-2005, 03:06 PM

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