+ Reply to Thread
Results 1 to 5 of 5

Calculating which state a project came from using a 2 digit legend

  1. #1
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Calculating which state a project came from using a 2 digit legend

    Hey guys,

    I have a workbook the logs projects that were completed in a specific year, I recently had help from this forum to calculate how many projects were completed in a particular year ignoring multiple entries of the same project number. Now I need to calculate where in Australia did each project come from? Each project starts with a specific 2 digits e.g. 1500012345 would be 15 = Sydney & 250003214 would be 25 = Brisbane, ultimately I want to produce a map chart to show the number of projects completed state by state in a given year. I have an example attached, to explain further...as always guys, any assistance would be greatly appreciated ok - Marc
    Attached Files Attached Files
    Last edited by matrixpom; 02-11-2021 at 08:42 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Calculating which state a project came from using a 2 digit legend

    The data in column B has Text and number.
    Excel considers text "1" and number 1 differently.

    G2
    =COUNT(1/FREQUENCY(IF(YEAR($C$2:$C$3004)=G1,--$B$2:$B$3004),--$B$2:$B$3004))

    P2
    =COUNT(1/FREQUENCY(IF(YEAR($C$2:$C$3004)=P$1,IF(ISNUMBER(MATCH(LEFT($B$2:$B$3004,2),IF($H$7:$H$19=$O2,$G$7:$G$19&""),)),--$B$2:$B$3004)),--$B$2:$B$3004))


    For MS365
    G2
    =COUNT(UNIQUE(FILTER(--$B$2:$B$3000,YEAR($C$2:$C$3000)=G1)))

    P2
    =COUNT(UNIQUE(FILTER(--$B$2:$B$3000,(YEAR($C$2:$C$3000)=P$1)*ISNUMBER(MATCH(LEFT($B$2:$B$3000,2),FILTER($G$7:$G$19&"",$H$7:$H$19=$O2),)))))
    Attached Files Attached Files

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Calculating which state a project came from using a 2 digit legend

    Hi Matrixpom,

    Your problem looks like a Pivot Table answer to me. See my answer attached.
    Pivot Count Year Columns.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: Calculating which state a project came from using a 2 digit legend

    Thanks again Bo_Ry, I intend to tidy up the data in column B to reflect only numbers, so your formula works a treat as always! This is perfect & I like the update to your first formula for finding unique numbers! Thanks mate & have a great weekend - Marc

  5. #5
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: Calculating which state a project came from using a 2 digit legend

    Hi MarvinP,
    Thanks for the link, I need to research pivot tables a lot more, thanks for the link - Marc

+ 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. Formula for calculating a barcode check digit
    By tukae in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-02-2020, 12:51 PM
  2. Only Allow 2 digit state code & force upper case
    By bj90 in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 07-21-2019, 02:09 PM
  3. 50 States, Drop-Down List, select a state then produce the # for that state
    By Sir CHARLES in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2015, 07:46 PM
  4. [SOLVED] Lookup State Name from State Code and and Display in column in COUNTIES worksheet.
    By Jim15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2014, 02:41 PM
  5. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  6. Calculating the maximum run of the same digit
    By giantwolf in forum Excel General
    Replies: 2
    Last Post: 09-01-2010, 05:20 AM
  7. Need help calculating project hours
    By udm1989 in forum Excel General
    Replies: 4
    Last Post: 10-05-2006, 11:47 AM

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