Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formatting Repeated Values

ID Title Theater City Date
1234 Matrix AMC Buckhead 1/29/2004
1234 Matrix AMC Buckhead 1/30/2004
1234 Matrix AMC Buckhead 1/31/2004
1222 Matrix2 AMC Jonesboro 1/31/2004

If the ID is the same how can I format (via formula or VBA)the duplicate row to
read:

ID Title Theater City Date

1234 Matrix AMC Buckhead 1/29/2004
"" "" "" "" 1/30/2004
"" "" "" "" 1/31/2004
1222 Matrix2 AMC Jonesboro 1/31/2004


thanks in advance
OS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Formatting Repeated Values

OS

If you copy this code and highlight the ID column before running it it
should work. (Back up before trying)

Sub insertDitto()
Dim lCounter As Long
Dim rSelection As Range
Set rSelection = Selection
lCounter = rSelection.Rows.Count
For lCounter = lCounter To 1 Step -1
If rSelection.Cells(lCounter).Value = rSelection.Cells(lCounter).Offset(-1,
0).Value Then
rSelection.Cells(lCounter).Value = """"
rSelection.Cells(lCounter).Offset(0, 1).Value = """"
rSelection.Cells(lCounter).Offset(0, 2).Value = """"
rSelection.Cells(lCounter).Offset(0, 3).Value = """"
End If
Next lCounter
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"OriginalStealth" wrote in
message ...
ID Title Theater City Date
1234 Matrix AMC Buckhead 1/29/2004
1234 Matrix AMC Buckhead 1/30/2004
1234 Matrix AMC Buckhead 1/31/2004
1222 Matrix2 AMC Jonesboro 1/31/2004

If the ID is the same how can I format (via formula or VBA)the duplicate

row to
read:

ID Title Theater City Date

1234 Matrix AMC Buckhead 1/29/2004
"" "" "" "" 1/30/2004
"" "" "" "" 1/31/2004
1222 Matrix2 AMC Jonesboro 1/31/2004


thanks in advance
OS



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
repeated values sood Excel Worksheet Functions 1 June 14th 09 04:24 PM
Top 10 with Repeated Values Cavy Excel Discussion (Misc queries) 9 October 10th 07 07:43 PM
Repeated values in a row reynold Excel Discussion (Misc queries) 1 December 30th 05 01:08 PM
create list of unique values from a column with repeated values? Chad Schaben Excel Worksheet Functions 1 July 8th 05 10:25 PM
Hiding repeated values jake Excel Discussion (Misc queries) 2 April 27th 05 11:32 AM


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