+ Reply to Thread
Results 1 to 5 of 5

If and count/sum formula?

  1. #1
    Registered User
    Join Date
    04-07-2014
    Location
    Knoxville, TN
    MS-Off Ver
    Excel 2007
    Posts
    37

    If and count/sum formula?

    In tab 1, column "A" of my report i have a list of vendor numbers (some repeat). Column E has the amount spent on a particular order. On tab 2 i have a separate report that lists each vendor once by the vendor number in column J. I need to get the total count for each order to correspond with each vendor in tab 2, column Z along with the spend in column AA.
    I need an if statement i am assuming similir to =if(a2:a1000(tab1)= j2Count) or =if(a2:a1000(tab1)=j2(sum(e2)

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If and count/sum formula?

    Try

    =SUMIF(Sheet1!$A$2:$A$1000, J2, Sheet1!$E$2:$E$1000)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: If and count/sum formula?

    Use COUNTIF

    =COUNTIF(A2:a1000,J2)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    04-07-2014
    Location
    Knoxville, TN
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: If and count/sum formula?

    So i think i left something off, as none of those are working. On tab 2, in my column "J" the vendor numbers go from J2:J284.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If and count/sum formula?

    Okay, in rereading your original post,

    In Z2 of tab 2, copied down
    =COUNTIF(sheet1!A2:a1000,J2) (ace's formula)
    this counts how many times the vender appears in tab 1

    In AA2 of tab 2, copied down
    =SUMIF(Sheet1!$A$2:$A$1000, J2, Sheet1!$E$2:$E$1000)
    this sums up the $ amounts in column E of sheet 1 for the vender mentioned in J2
    You'll need to modify sheet names (if they have spaces, they need single quotes around them) and the data ranges
    If this is not working, perhaps a sample workbook (Go Advanced>Manage Attachments)

+ 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] Count formula not count hidden cells in table
    By tlacloche in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-06-2013, 02:35 PM
  2. [SOLVED] Count and average formula needed to not count text field
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2013, 05:30 PM
  3. [SOLVED] text count issue, it seems to count the formula also?
    By randypang in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2013, 03:27 AM
  4. Replies: 5
    Last Post: 08-29-2012, 05:25 PM
  5. Count Formula-Would this be a good example to use the count function?
    By JK1234 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-01-2008, 02:44 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