GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Windows
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 19-Aug-2008, 14:35
Danniel Danniel is offline
New Member
 
Join Date: Aug 2008
Posts: 1
Danniel is on a distinguished road

Problem with a Macro in Excel


Hello,

I'm trying to make a macro that will add (and show the sum) of some values in column D, IF their values in column A are the same. (all the A's in one group, the B's in another, etc)
Let me show you:



Therefore, if the cell in column A is an A, I would like it to add the values of the cells in column D, and display them in F2
Then add all the B's values into G2
and so on.
So it would look something like this:



Is this possible? It's the only remaining piece in this big project, and I can't find the solution anywhere...

Thank you for your time,
Danniel
  #2  
Old 07-Nov-2008, 21:21
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Problem with a Macro in Excel


Whew, sorry that it has been so long for this post, I need to visit the computer software forum more often!

The SUMIF() function should do what you need.

So, for your example data, keeping cells F1, G1, H1, and I1 populated with A, B, C, and D, respectively [to use as a SUMIF argument reference], then the formula using SUMIF in cell F2 would simply be:

=SUMIF($A$8:$A$24,F1,$D$8:$D$24)

Then simply fill this formula to the right three cells ( G2, H2, and I2) and the 2nd argument will automatically adjust!
HTH

Feel free to ask any Q!
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro problem with Assembly language Widgets Assembly Language 5 11-Nov-2007 13:30
What is the problem in this macro thagafnh C++ Forum 1 30-Sep-2007 15:40
Move Excel charts to a Word document (macro) jzfromltown Miscellaneous Programming Forum 2 15-Dec-2006 14:50
Torrents Download Problem chandeep Computer Software Forum - Linux 7 09-Oct-2006 23:37
a significant problem after installing Xp mohammad Computer Software Forum - Windows 10 09-Aug-2005 08:03

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:01.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.