+ Reply to Thread
Results 1 to 8 of 8

Quantity in column D based on order amount of times the order no appears

  1. #1
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Los Angeles, USA
    MS-Off Ver
    2003, 2010, 365
    Posts
    320

    Quantity in column D based on order amount of times the order no appears

    Hi,

    In the attached file I have the order number in column A and if it appears once then I would like the VBA to place a 1 in column D, but if it appears more than once then I would like the amount of times it appears in column D.

    Hope this makes sense and thanks for any help,

    David
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Quantity in column D based on order amount of times the order no appears

    Use Pivot Table.

  3. #3
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Los Angeles, USA
    MS-Off Ver
    2003, 2010, 365
    Posts
    320

    Re: Quantity in column D based on order amount of times the order no appears

    I would like to use VBA because it will be part of a larger VBA project.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Quantity in column D based on order amount of times the order no appears

    This is a trivial problem to solve with a formula. Using VBA really doesn't make any sense. Put this formula in D2 and then copy down:

    =COUNTIF(A:A,A2)

    Just because there is VBA used for something else doesn't mean this has to be VBA.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Quantity in column D based on order amount of times the order no appears

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Los Angeles, USA
    MS-Off Ver
    2003, 2010, 365
    Posts
    320

    Re: Quantity in column D based on order amount of times the order no appears

    Thanks John, that's great.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Quantity in column D based on order amount of times the order no appears

    You're welcome. Glad to help out.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Quantity in column D based on order amount of times the order no appears

    This one lets Excel do the heavy lifting.

    Please Login or Register  to view this content.

+ 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. [SOLVED] Probably a SUM formula for order no. to get the total amount of order
    By Konnie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2013, 04:29 AM
  2. [SOLVED] Count the amount of times specific data appears based on criter
    By Ash Ford in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-11-2013, 12:19 PM
  3. Replies: 2
    Last Post: 12-09-2009, 06:36 AM
  4. Replies: 5
    Last Post: 11-23-2009, 06:24 PM
  5. I want a box with the total number of times ORDER appears!
    By tapley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2006, 09:20 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