Stuck on this at work please help :)

Angliojoe

Board Regular
Joined
Oct 28, 2011
Messages
61
Hello All,

I am very new to the site and was hoping you can help as Ive been trying to solve this problem for the last two hours :confused:

I have a sheet with two columns (Below) one has cart id (that is duplicated for each product sold) and in the next coloum I have the revenue generated (Not every product generates revenue hence the -). I really need a third coloumn that gives me the total revenue generated per cart but I have no idea of what formula to use?



Cart id Revenue Total revenue
AAGGB -
AAGGB £46
AAGGB -
AAGGB £22
ASDA -
ASDA £21
AEDC £33
AFRT £44
ASFF £55
ASFF -


If anyone could help I would really appreciate it,

Thanks in advance,

Joe.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try like this - formula in C2 copied down

Excel Workbook
ABC
1IDTotal
2AAGGB-68
3AAGGB4668
4AAGGB-68
5AAGGB2268
6ASDA-21
7ASDA2121
8AEDC3333
9AFRT4444
10ASFF5555
11ASFF-55
Sheet6
 
Upvote 0
Thank you so much! :) As i'm relatively new to excel could you just explain to me how the formula does what it does?

Thanks again,

Joe.
 
Upvote 0
SUMIF works like this

=SUMIF(range1,value,range2)

It adds together the values in range2 where the corresponding row in range1 equals the value.
 
Upvote 0
Hi,

Just a qick question about the formula above. Is there anyway of doing it so the sum is only displayed once rather than on each line. For example;

ACCB £10 £15
ACCB
ACCB £5

Thanks,

joe.
 
Upvote 0
Hi Joe,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
I would use a pivot table in this case. You would get is a table with one row per ID with that ID’s total revenue.<o:p></o:p>
But if you only want to change the formulas in your worksheet you could try:<o:p></o:p>
C2: =IF(COUNTIF($A$2:A2,A2)=1;SUMIF($A$2:$A$11,A2,$B$2:$B$11),"") <o:p></o:p>
and then copied down.
 
Upvote 0

Forum statistics

Threads
1,224,889
Messages
6,181,607
Members
453,055
Latest member
cope7895

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top