Can I set up a formula to lookup a value for a condition

J

Jai

I am trying to set up a formula for a vendor list. Each vendor has its own
individual number in column C.Some of vendors are grouped together. If vendor
is not grouped Column D has same number as of C. If Vendor is grouped, first
vendor number in Column C is assigned to all the group members. I need to set
up a formula so that col. E will look for vendor number in col. D and add
data for one group. Please help. Below is an example of my data list

Vendor name vendor number grouping number Purchases Sales Profit
abcd 251 251 $$$
$$$
addd 233 233
adfg 544 233

251 vendor number has its only one row
233 is grouped and 544 is member of 233 group
 
T

tonywig

Something like this?

=IF(B2<>C2,"-",SUMIF(C$2:C$4,B2,D$2:D$4))

Where vendor number is different to group, no value is summed.
Where vendor number = group (i.e. it is the first in a group or it i
not in a group) then sum everything for that group
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top