Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2008

Tip: Looking for answers? Try searching our database.

Remove useless information

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
djaydida - 27 Mar 2008 16:16 GMT
How can add all the numbers for a total, and only Keep in all in one line.
Example below, nubers totals 9, but i only need that with one name, one
address, one city, one state, and one phone #...I have a spreadsheet that
have been working on for two days.

1    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
2    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
1    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
1    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
1    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
2    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
1    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
Don Guillett - 27 Mar 2008 17:12 GMT
try

Sub consolitateem()
Application.ScreenUpdating = False
Sheets("sheet8").Range("j1:k35").Copy Range("a1")
mc = 2 'col B
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1
If Cells(i - 1, mc) = Cells(i, mc) Then
mysum = Cells(i, mc - 1) + Cells(i + 1, mc - 1)
Rows(i + 1).Delete
Else
mysum = 0
End If
Cells(i, mc - 1) = mysum
Next i
Rows(2).Delete
Application.ScreenUpdating = False
End Sub

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> How can add all the numbers for a total, and only Keep in all in one line.
> Example below, nubers totals 9, but i only need that with one name, one
[quoted text clipped - 15 lines]
> 1 Mark Roy 5642 N. Heatherstone Drive Shreveport LA 71129-4814 (864)
> 844-2812
Beege - 27 Mar 2008 18:16 GMT
> How can add all the numbers for a total, and only Keep in all in one line.
> Example below, nubers totals 9, but i only need that with one name, one
[quoted text clipped - 8 lines]
> 2    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812
> 1    Mark Roy    5642 N. Heatherstone Drive    Shreveport    LA    71129-4814    (864) 844-2812

Would a pivot table work for you here?

Beege
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.