+ Reply to Thread
Results 1 to 7 of 7

Unique Accounts for Warehouses

  1. #1
    Registered User
    Join Date
    07-13-2016
    Location
    Clackamas, OR
    MS-Off Ver
    2013
    Posts
    3

    Unique Accounts for Warehouses

    Hi there,

    I have a data set where I have lines of data that show a vendor that was purchased from and the weight associated with that purchase, then what warehouse those goods were stored in. What I'm trying to figure out is how to write a command in excel to ask how many accounts (aka vendors) exist in each warehouse. My perfect world is that I could eventually put this into the Pivot Table I have which shows each account list under a given warehouse and the weight associated with each account. I originally thought I could use a countif, but then I realized I probably needed to do some sort of nested function. I'm pretty new to the nested function world and struggle to figure out what to nest in order to get what I want. Can anyone assist?

    Unfortunately, I tried to upload an attachment and was unsuccessful. Here is an example snip it.

    Vendor Name wt Storage Name
    MERIDIAN PRODUCTS, INC. 250 VERNON ALCOA COLD STORAGE
    MERIDIAN PRODUCTS, INC. 250 VERNON ALCOA COLD STORAGE
    MERIDIAN PRODUCTS, INC. 80 VERNON ALCOA COLD STORAGE
    MERIDIAN PRODUCTS, INC. 320 VERNON ALCOA COLD STORAGE
    MERIDIAN PRODUCTS, INC. 20 VERNON ALCOA COLD STORAGE
    MERIDIAN PRODUCTS, INC. 320 VERNON ALCOA COLD STORAGE
    NW GOURMET FOOD PRODUCTS 1080 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 600 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 720 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 1200 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 840 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 960 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 480 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 720 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 600 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 840 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 720 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 900 WIN TRUCKING ITS COLD STR
    NW GOURMET FOOD PRODUCTS 1200 WIN TRUCKING ITS COLD STR
    SOJITZ CORP OF AMERICA 660 WORLD FRESH
    SOJITZ CORP OF AMERICA 880 WORLD FRESH
    POSEIDON SEAFOOD CORP 440 WORLD FRESH
    POSEIDON SEAFOOD CORP 660 WORLD FRESH
    POSEIDON SEAFOOD CORP 660 WORLD FRESH


    Thanks,
    AnnaRose
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Unique Accounts for Warehouses

    I built a simple PT that has warehouse, vendor and weight. Look at this and determine if this is what you are looking for.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-13-2016
    Location
    Clackamas, OR
    MS-Off Ver
    2013
    Posts
    3

    Re: Unique Accounts for Warehouses

    Hi Alan,

    Unfortunately, I already have this pivot table, but what I would like is a count how many unique accounts there are for each of those storage warehouses. My other searches online are getting me to this function:

    =SUM(IF(FREQUENCY(IF(Name=A2,MATCH(Customer,Customer,0)),ROW(Customer)-MIN(ROW(Customer))+1),1))

    Where instead for me Name would be the Warehouse and Customer would instead be the account name, but unfortunately I have not been able to get this to work for me.

    AnnaRose

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Unique Accounts for Warehouses

    Here is a VBA solution that should do that for you.

    Please Login or Register  to view this content.
    See attached


    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Attached Files Attached Files

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Unique Accounts for Warehouses

    Try array-entering this in I3 and double clicking the fill handle. This takes my machine about 30 sec to calculate. Array formulas are resource heavy. You may wish to consider alternatives.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.


    Edit I went back and noticed you have essentially the same formula already. It should work. Did you array enter it?
    Attached Files Attached Files
    Last edited by FlameRetired; 07-15-2016 at 09:45 PM.
    Dave

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Unique Accounts for Warehouses

    annara,

    Try changing the formula you have to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Array enter it and fill down.

    It works at my end.

  7. #7
    Registered User
    Join Date
    07-13-2016
    Location
    Clackamas, OR
    MS-Off Ver
    2013
    Posts
    3

    Re: Unique Accounts for Warehouses

    Hi all,

    FlameRetired, yes! I finally figured out the Array formula to work. Finally!

    Alan, thanks for the VBA code! I will try it out. I'm just starting to dip my toes in that realm of Excel. Thank you!

+ 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. Replies: 6
    Last Post: 04-16-2015, 01:45 PM
  2. Moving Stock between Warehouses
    By jarrellanthony in forum Excel General
    Replies: 6
    Last Post: 05-22-2014, 05:36 PM
  3. Problem with warehouses location and distances
    By fernando112 in forum Excel General
    Replies: 6
    Last Post: 03-28-2014, 02:04 AM
  4. VBA Help - Find 38 unique values (accounts) across all worksheets & display entire row
    By birdtheword in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2014, 10:37 AM
  5. Please help, intricate subtotal for main accounts with many sub accounts!!
    By mitch_bossard in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 05:17 PM
  6. Items / Warehouses
    By ElmerS in forum Excel General
    Replies: 6
    Last Post: 02-13-2010, 01:06 PM
  7. VBA with PivotTable Count of Accounts - Want to show Sum of Accounts
    By snake10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2008, 07:27 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