+ Reply to Thread
Results 1 to 3 of 3

Count a series of number with different types/description

  1. #1
    Registered User
    Join Date
    09-28-2009
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Arrow Count a series of number with different types/description

    I want to create a macro that counts like the following:

    Column A: Structure
    Column B: Quantity of poles
    Column C: Pole class (range from 1 to 10)
    Column D: Pole Height (range from 50 to 140)

    For example
    1 2 1 100 means structure 2 have 2 class 1 - 100' poles,
    2 3 1 100
    3 2 5 90

    Result:
    5 1 100 (*Note :5 Class 1 - 100' poles)
    2 5 90 (2 Class 5 - 90' poles)

    I have also attached an excel spreadsheet using the record macro tool to did some calculation, but it can only perform count by entering each set of data one at a time, so I'm working on the loop function that using this strategy, it gives me error. And I'm stuck, please help. I appreciate all your effort. Thank you very much.
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count a series of number with different types/description

    Might be easier to post your desired output based on sample data on a separate sheet... as is I can't tell if you're trying to create a matrix summing quantity irrespective of structure or not.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count a series of number with different types/description

    Perhaps you mean to populate the 2nd table listed on Calculation tab with total quantity based on Class / Quantity ?

    If so, to avoid expensive formulae either

    a) use a Pivot Table setting Class as ROW Field and Height as COLUMN Field with Quantity as DATA Field set to SUM

    b) use Concatenation / SUMIF

    Input!F2: =D2&"@"&E2
    copied down for all rows

    Calculation!B17: =SUMIF(Input!$F:$F,$A17&"@"&B$16,Input!$C:$C)
    applied across matrix B17:Q26

+ 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