#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default formula -too slow

Hello I have Excel 2002
I have a report that is imported from another system
col A has the name of the rep, col B has the ID no., col C has the order
type
and col D has the number of calls received for the order type
in column E I have this formula =IF(A1=A2,D1+D2,"0")
Then I go back and delete the row that has the duplicate name

Problem
Is there a faster way to do this, ? Sometimes the report has over 500 lines
and it takes a while to delete the rows thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default formula -too slow

You can use almost the same formula to do it, if it is sorted by rep then
=IF(A1=A2,1,"") this will put a 1 in all dupes, copy paste special values the
whole column, then sort and delete all of the rows with a 1.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Wanna Learn" wrote:

Hello I have Excel 2002
I have a report that is imported from another system
col A has the name of the rep, col B has the ID no., col C has the order
type
and col D has the number of calls received for the order type
in column E I have this formula =IF(A1=A2,D1+D2,"0")
Then I go back and delete the row that has the duplicate name

Problem
Is there a faster way to do this, ? Sometimes the report has over 500 lines
and it takes a while to delete the rows thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default formula -too slow

Copy this macro to a module and execute from the sheet with the data. It
adds it up and deletes the rows for you.

Sub AddUpColDandDeleteDups()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
If Cells(i - 1, "a") = Cells(i, "a") Then
Cells(i - 1, "d") = Cells(i - 1, "d") + Cells(i, "d")
Rows(i).Delete
End If
Next i
End Sub

If you're new to macros, you may want to read David McRitchie's intro
at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wanna Learn" wrote in message
...
Hello I have Excel 2002
I have a report that is imported from another system
col A has the name of the rep, col B has the ID no., col C has the order
type
and col D has the number of calls received for the order type
in column E I have this formula =IF(A1=A2,D1+D2,"0")
Then I go back and delete the row that has the duplicate name

Problem
Is there a faster way to do this, ? Sometimes the report has over 500
lines
and it takes a while to delete the rows thanks in advance


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
Why is excel 2007 slow when selecting chart data from the formula RodMTS Charts and Charting in Excel 1 November 4th 07 11:05 PM
Slow Excel Navigation with Up / Down Arrow and slow scrolling deddog Excel Discussion (Misc queries) 0 August 14th 07 09:56 PM
Why so slow max Excel Discussion (Misc queries) 1 February 27th 06 02:38 PM
Formula Arrays VERY SLOW in Excel 2002 Patrick Excel Worksheet Functions 2 January 27th 05 12:59 AM
sumproduct formula to slow Todd Excel Worksheet Functions 4 December 21st 04 11:25 PM


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

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"