+ Reply to Thread
Results 1 to 3 of 3

MsgBox count of unique values minus column D if equal B or C

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

    MsgBox count of unique values minus column D if equal B or C

    Hi,

    Currently the attached example has a module that displays the total count of each order per client name in column B, what I need is to show the total minus duplicates based on either column A or C and if Column D has a B or C then also deduct that order from the clients total.

    I'm using Excel 2003 only.

    Current VBA used in attached example below:
    Please Login or Register  to view this content.
    I hope this makes sense.

    Thanks for any help,

    David
    Attached Files Attached Files

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

    Re: MsgBox count of unique values minus column D if equal B or C

    Solved it myself, below if anybody needs it.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: MsgBox count of unique values minus column D if equal B or C

    Hi djfscouse,
    I clicked your topic to see if I could help, but I see you already solved it yourself.

    I took a quick look at your code and realized that some things seemed a little out of place (ie. DisplayAlerts was not re-set to TRUE before the code ended).

    Since you were so kind as to post the code you have, and I could also use it, I thought I'd post a revised code that takes the "Select" out of the coding (which basically stops the code), and provide you with my improvements. I also used the "PasteValue" feature just in case there would be formulas in the original sheet. (Formulas would not carry over correctly to the added sheet.)

    I'm using Excel 2010. But I'm pretty sure the VBA coding will work on your 2003 version, as I don't see any newer version language I did to the code that wouldn't work with 2003.
    Please let me know if anything is different.

    Please Login or Register  to view this content.
    Last edited by Jim885; 03-25-2014 at 05:05 PM.
    If I helped in any way, please click the star

+ 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: 4
    Last Post: 05-08-2013, 08:33 AM
  2. Replies: 11
    Last Post: 01-18-2013, 04:05 PM
  3. Count Unique Values In One Column Basis Unique Values in Another Column
    By shez_raz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2012, 01:55 AM
  4. Count number of values equal to MAX of a column
    By dauclair in forum Excel General
    Replies: 1
    Last Post: 05-30-2006, 09:30 AM
  5. how do you count a column minus dupicates minus blanks.
    By notEXCELing in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2005, 08:48 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