LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum values based on criteria in another column

Essentially, what I am looking to do is go through a sheet and say:
If value of C3 matches value of C2, then add J2+J3, and then delete row 3.
If i was familiar with excel, or knew how to script/program in excel, i would
think it would be something like this (basic idea...)

n == 3
DO While (n < Number_of_rows)
DO While (Cn == C2)
J2 == J2 + Jn
Delete Row 3
End Do
n == n+1
END DO

^^ That would be check to see if the contents of column C matched the
contents of C2, and if they did, would sum the J column values in J2. I
would then have more code to check to see if any of the values of column C
matched the new value in C3, and would combine all J column values into J3.
Then check C4 and sum into J4, C5 sum J's into J5... Etc. All the way
through C(number of rows) into J(number of rows)

It's been a while since I did any real programming, and the only language i
even know is fortran, so sorry if that code is hard to follow... Any help
would be very much appreciated!!!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter duplicates based on criteria / column values phillr Excel Discussion (Misc queries) 0 April 9th 10 09:13 PM
Sum of values based on different criteria Irene Excel Discussion (Misc queries) 4 November 19th 08 11:17 PM
Looking up values based on two criteria LauriS Excel Worksheet Functions 8 August 24th 07 02:30 PM
Need to add values based on three other criteria Jonathan[_14_] Excel Programming 2 August 31st 06 11:10 AM
summing values in a data table based on criteria in another column Dave F Excel Worksheet Functions 7 August 26th 06 04:36 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"