Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default data find and add for summary


I have some data that looks something like this

Qty.......Qty Bad...Reason
34........2.........too long
45........0
44........4.........too short
54........3.........too long

I need to (in a macro) build a summary like
total number 177
too long 5
too short 4

I have a few ideas (for each row, if there is a reason, see if th
reason is in the summary yet and add it if not and add th
corresponding number to the running total)
I started coding this up and it looks messy and complicated and slow.
I can do it this way, but if someone feels like showing off his Exce
prowess and helping me out by giving me some ideas, I would appreciat
it.

thanks,
Tomm

--
TommySzalapsk
-----------------------------------------------------------------------
TommySzalapski's Profile: http://www.excelforum.com/member.php...fo&userid=2556
View this thread: http://www.excelforum.com/showthread.php?threadid=39225

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default data find and add for summary

Dim rng as Range, s as String, s1 as String, s2 as String
set rng = Range(Cells(2,1),Cells(rows.count,1).End(xlup))
s = "total nmber: " & rng.count
s1 = "too long: " & application.countif(rng.offset(0,2),"*long*")
s2 = "too short: " & application.countif(rng.offset(0,2),"*short*")

msgbox s & vbNewline & s1 & vbNewline & s2

--
Regards,
Tom Ogilvy

"TommySzalapski"
<TommySzalapski.1t5fb6_1123006014.0442@excelforu m-nospam.com wrote in
message news:TommySzalapski.1t5fb6_1123006014.0442@excelfo rum-nospam.com...

I have some data that looks something like this

Qty.......Qty Bad...Reason
34........2.........too long
45........0
44........4.........too short
54........3.........too long

I need to (in a macro) build a summary like
total number 177
too long 5
too short 4

I have a few ideas (for each row, if there is a reason, see if the
reason is in the summary yet and add it if not and add the
corresponding number to the running total)
I started coding this up and it looks messy and complicated and slow.
I can do it this way, but if someone feels like showing off his Excel
prowess and helping me out by giving me some ideas, I would appreciate
it.

thanks,
Tommy


--
TommySzalapski
------------------------------------------------------------------------
TommySzalapski's Profile:

http://www.excelforum.com/member.php...o&userid=25561
View this thread: http://www.excelforum.com/showthread...hreadid=392256



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
Data summary Norm Excel Discussion (Misc queries) 0 April 8th 10 04:49 PM
DATA SUMMARY M.GONZALEZ[_2_] Excel Worksheet Functions 1 May 28th 09 05:41 PM
Data summary Parish Pete Excel Discussion (Misc queries) 4 January 26th 09 07:23 PM
Summary data Tamara Excel Discussion (Misc queries) 2 July 30th 08 04:39 PM
Use detailed data in one worksheet to create summary data as chart source rdemyan Charts and Charting in Excel 0 January 23rd 07 02:18 PM


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

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"