sum of values based upon duplicate values in adjacent cell

DoctorAwesome

New Member
Joined
Oct 17, 2013
Messages
2
Hi all.

I am building a spreadsheet to calculate to total value of items that have been assigned a specific code. I want to be able to sum the cells in (for example) column D that have the same code in column A. I'm thinking maybe SUMIF would work but I'm a little stumped.

Thanks
 

Asala42

Well-known Member
Joined
Feb 26, 2002
Messages
2,318
The standard sumif will look like this:

=SUMIF($A$2:$A$1000,"1001001",$D$2:$D$1000)

where:
$A$2:$A$1000 is your column of codes
"1001001" is the code you are looking to match against. It could also be a cell reference rather than a distinct entry in quotes.
$D$2:$D$1000 is the range you want to sum when your criteria is met.

Hope that helps.
 

Forum statistics

Threads
1,081,678
Messages
5,360,462
Members
400,586
Latest member
Minty

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top