how to combine sum and vlookup functions

  • Thread starter Thread starter a.sauriol
  • Start date Start date
A

a.sauriol

To anyone, help!

I need to use the vlookup function. However going through
the database I noticed some of the items in the database
(product code) were appearing more then one time.
Therefore I need to have the sum of the items reported
using vlookup.

Can anyone help me please.

Thanks

Andre
 
(e-mail address removed) wrote...
I need to use the vlookup function. However going through
the database I noticed some of the items in the database
(product code) were appearing more then one time.
Therefore I need to have the sum of the items reported
using vlookup.

Use SUMIF with the optional 3rd argument. See online help for details
 
-----Original Message-----
(e-mail address removed) wrote...

Use SUMIF with the optional 3rd argument. See online help for details.


---Can you give me an example of the formula would look like what ?
Message posted

.
 
-----Original Message-----
Hi
try using SUMIF.Somthing like
=SUMIF(A1:A100,"productcode1",B1:B100)

thanks for the time, yet I don't see where the vlookup
fits in ? The formula must be though enough to go through
several thousands of cells.

Thanks
Andre
 
Hi
no need for VLOOKUP. If you currently have a VLOOKUP formula like
=VLOOKUP("productcode1",A1:B100,2,0)

this will return the first instance of column B there column a is equal
to 'productcode1'. But if you want to sum the values of column B for
ALL instances of 'productcode1' in column A use
=SUMIF(A1:A100,"productcode1",B1:B100)
instead. No need for VLOOKUP in this case!
 
Back
Top