Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SV SV is offline
external usenet poster
 
Posts: 15
Default Deleting Identical Entries

Greetings,
Fresh from my success at my first Macro (Thanks, again, Gord), I find my
users have ANOTHER request.

We generate a list of every part number and the figure on which it is
displayed. This means the list may contain a series of entries with the
same part number in the left-hand column. We've been asked to locate and
delete 'multiple entries' so the left column would have the part number only
on the first entry, and would be empty for the other rows that apply to that
part number. We can do it by hand, though it'd be tedious.

Here's what I'm trying for:

Currently: Desired

Part 1 A1 Part 1 A1
Part 1 D7 D7
Part 1 E5 E5
Part 1 G1 G1
Part 2 B3 Part 2 B3
Part 2 B6 B6
Part 2 D1 D1


I'm not sure what Macros are capable of, and maybe this is a question for
the scripting group?

Thanks,
Shane


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default Deleting Identical Entries

Programming would be better, but we can help.

Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim iLastRow As Long

With ActiveSheet

iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 2 Step -1
If Cells(i, TEST_COLUMN).Value = Cells(i - 1, "A").Value Then
Cells(i, TEST_COLUMN).Value = ""
End If
Next i

End With

End Sub

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"SV" wrote in message
...
Greetings,
Fresh from my success at my first Macro (Thanks, again, Gord), I find my
users have ANOTHER request.

We generate a list of every part number and the figure on which it is
displayed. This means the list may contain a series of entries with the
same part number in the left-hand column. We've been asked to locate and
delete 'multiple entries' so the left column would have the part number
only on the first entry, and would be empty for the other rows that apply
to that part number. We can do it by hand, though it'd be tedious.

Here's what I'm trying for:

Currently: Desired

Part 1 A1 Part 1 A1
Part 1 D7 D7
Part 1 E5 E5
Part 1 G1 G1
Part 2 B3 Part 2 B3
Part 2 B6 B6
Part 2 D1 D1


I'm not sure what Macros are capable of, and maybe this is a question for
the scripting group?

Thanks,
Shane



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SV SV is offline
external usenet poster
 
Posts: 15
Default Deleting Identical Entries

Sure does, thanks!

"Bob Phillips" wrote in message
...
Programming would be better, but we can help.

Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim iLastRow As Long

With ActiveSheet

iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 2 Step -1
If Cells(i, TEST_COLUMN).Value = Cells(i - 1, "A").Value Then
Cells(i, TEST_COLUMN).Value = ""
End If
Next i

End With

End Sub

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"SV" wrote in message
...
Greetings,
Fresh from my success at my first Macro (Thanks, again, Gord), I find my
users have ANOTHER request.

We generate a list of every part number and the figure on which it is
displayed. This means the list may contain a series of entries with the
same part number in the left-hand column. We've been asked to locate and
delete 'multiple entries' so the left column would have the part number
only on the first entry, and would be empty for the other rows that apply
to that part number. We can do it by hand, though it'd be tedious.

Here's what I'm trying for:

Currently: Desired

Part 1 A1 Part 1 A1
Part 1 D7 D7
Part 1 E5 E5
Part 1 G1 G1
Part 2 B3 Part 2 B3
Part 2 B6 B6
Part 2 D1 D1


I'm not sure what Macros are capable of, and maybe this is a question for
the scripting group?

Thanks,
Shane





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
deleting blank entries mikeyVo Excel Discussion (Misc queries) 1 August 4th 06 06:30 AM
Deleting All Rows for Duplicate Entries Except Those With Most Items In Row foofoo Excel Discussion (Misc queries) 1 October 22nd 05 02:49 AM
Deleting duplicate entries in an Excel list ticephotos Excel Worksheet Functions 5 May 3rd 05 08:44 PM
Deleting duplicate entries in Excel list ticephotos Excel Discussion (Misc queries) 2 May 3rd 05 06:22 PM
Two identical entries in "Window" list John Keith Excel Discussion (Misc queries) 5 February 17th 05 02:45 AM


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