Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
meendar
 
Posts: n/a
Default Eliminate Duplicate Rows - Add columns Accordingly

Hi anyone helpme to sort out this problem.

I have an Excel sheet with names in Column A, Hours in Column B and
Amount in Column C. What my question is i want to eliminate the
duplicate rows in Column A , mean while B and C should be added to the
unique user row. Is there any macro for that?

Thanks in Advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Eliminate Duplicate Rows - Add columns Accordingly

Sub CreateSummary()
Dim iLastRow As Long
Dim i As Long
Dim iRow As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 2 Step -1
iRow = Application.Match(Cells(i, "A").Value, Columns(1), 0)
If iRow < i Then
Cells(iRow, "B").Value = Cells(iRow, "B").Value + Cells(i,
"B").Value
Cells(iRow, "C").Value = Cells(iRow, "C").Value + Cells(i,
"C").Value
Rows(i).Delete
End If
Next i

End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"meendar" wrote in message
oups.com...
Hi anyone helpme to sort out this problem.

I have an Excel sheet with names in Column A, Hours in Column B and
Amount in Column C. What my question is i want to eliminate the
duplicate rows in Column A , mean while B and C should be added to the
unique user row. Is there any macro for that?

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
How can I transpose rows to columns in a large worksheet? ratchick Excel Discussion (Misc queries) 7 November 11th 05 04:25 PM
REQ: Columns to rows or Rows to Columns nonapp Excel Discussion (Misc queries) 4 October 26th 05 12:24 AM
How to reverse order of rows and columns Johnny Excel Discussion (Misc queries) 3 September 11th 05 03:42 PM
How to keep rows together when sorting columns? Amit Excel Worksheet Functions 1 March 28th 05 06:01 PM
sumif columns and rows Paul Clough Excel Worksheet Functions 2 November 22nd 04 05:01 PM


All times are GMT +1. The time now is 09:27 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"