+ Reply to Thread
Results 1 to 2 of 2

Sumif column "O" for excluding values with duplicate values in column "F"

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Milwaukee
    MS-Off Ver
    Excel 2007/2010
    Posts
    18

    Sumif column "O" for excluding values with duplicate values in column "F"

    Good afternoon all,

    I'm putting together a macro to format a spreadsheet for upload into Access. I've reached a point, only a few minutes in, that I can't figure out on my own. I'm no expert by any means, but am the only one in my workplace with any VBA knowledge at all, so this task falls on my shoulders alone (hopefully with some of your assistance as well!)

    Book1.xls

    I need to total all the miles in cell O24, however, in some cases, there are duplicate locations (received more than 1 order). These miles did not occur twice so I need them to only be counted once based on unique values in column "F". The three instances of this in the spreadsheet are highlighted in yellow. Basically, I only want the miles counted once for each unique location.

    Thank you all!
    Last edited by jobell; 01-04-2013 at 02:46 PM. Reason: brainfart

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sumif column "O" for excluding values with duplicate values in column "F"

    hi jobell. do you have to use VBA? here's an array formula you can use without VBA.
    =SUM(IF(FREQUENCY(MATCH(F2:F23,F2:F23,0),ROW(F2:F23)-1)>0,O2:O23))
    you have to paste the formula inside the formula bar & press CTRL + SHIFT + ENTER

    i'm not really good in VBA, but it would look something like this if you need it:
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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