Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 2 loops? got me spinning

I have States in column D and a percentage in column Z (on Data sheet). I
would like to loop through rows in the sheet and sum column Z for each state
in column D. The list of States is on worksheet States and column C.

For example... TX may show up twice on Data sheet and would like a sum for
the number in column Z for Texas. Can I put that total on the States sheet
in column D next to the state abbreviation?

Any help is appreciated
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 2 loops? got me spinning

Probably don't need VBA for this. Type this formula into an empty next to
column D and drag down. Should do the summing you want for each state:

=SUMIF(Data!D2:D100,States!C2,Data!Z2:Z100)

Adjust the formula to suit your data and columns, then drag down to sum all
50 states.

HTH,

Eric

"John" wrote:

I have States in column D and a percentage in column Z (on Data sheet). I
would like to loop through rows in the sheet and sum column Z for each state
in column D. The list of States is on worksheet States and column C.

For example... TX may show up twice on Data sheet and would like a sum for
the number in column Z for Texas. Can I put that total on the States sheet
in column D next to the state abbreviation?

Any help is appreciated

Reply
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
head spinning loop... Stephen[_24_] Excel Programming 1 November 23rd 07 10:28 PM
Insert spinning button with time format in Excel 2000? Pat Hughes Excel Discussion (Misc queries) 5 October 27th 05 12:55 AM
Spinning Numbers Michael[_23_] Excel Programming 1 December 28th 03 11:05 PM
Spinning numbers Michael[_23_] Excel Programming 1 December 24th 03 06:31 AM
LOOPS Fernando Duran Excel Programming 2 September 3rd 03 01:07 AM


All times are GMT +1. The time now is 12:39 PM.

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

About Us

"It's about Microsoft Excel"