View Full Version : Sum
Tvercetti
10-15-2007, 06:33 PM
I am trying to sum all the values relating to an artist. So for Artist1 I would want to add all the values in Column B that are next to Artist 1, so in this case the first 3 values in Column B. I have an inputbox already asking me what artist, but I dont know how to sum the values relating to the artist selected.
So Columns A has
Artist 1
Artist 1
Artist 1
Artist 3
Artist 3
Artist 3
Artist 9
Columns B has
1
1
2
33
44
55
44
Thanks.
lucas
10-15-2007, 08:13 PM
Hi Tvercetti,
Seems a good solution might be a sumif formula. See the attached and check the formula's in Column F. Hope this helps.
Formula used: =SUMIF($A$2:$A$8,E3,$B$2:$B$8)
Tvercetti
10-16-2007, 06:23 AM
Great, thanks. I also wanted to do some more.
I have added a column C with some more numbers relating to the artists in columns A
I already have the input box where the user selects the artist and whether to sum column B or C. So I could select Artist 1, and have either the sum of column B or C relating to this artist.
How do I do this? I want to show the end result in a message box. So e.g. The sum of (column B) for Artist 2 is ....)
Thanks for all the help.
lucas
10-16-2007, 06:27 AM
Why don't you share what you have with us so we don't have to rebuild the whole thing just to help you?
Tvercetti
10-16-2007, 10:58 AM
Hi Lucas, im sorry, that would make sense.
Im doing this for a friend of mine, and dont have the spreadsheet here.
Can you put me on the right path maybe by explaining how this could be done?
Bob Phillips
10-16-2007, 11:37 AM
How about a table like this?
Tvercetti
10-16-2007, 12:25 PM
hi xld
Sorry, a table like what?
Bob Phillips
10-16-2007, 12:43 PM
Sorry, I menat this http://cjoint.com/?kqvRfWX52H
Tvercetti
10-16-2007, 12:56 PM
Great, thanks once again for your help
I wanted some advice on how I could display select amount of information to the user. Lets just say I hide that table you created so the user cant see it.
So if I were to get 2 inputs from the user that they want to know the (whatever column B represents) for Artist 9, how can I display a message what the value for those selections are, (eg. 44 from your table)?
I know how to get the inputs, but dont know how to get the message.
lucas
10-16-2007, 03:31 PM
a simple setup for what you want to do...see attached
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.