View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Tasmania Tasmania is offline
external usenet poster
 
Posts: 10
Default Excel Macro or VBA

Thank you, it's working.
--
thadi


"Jon Peltier" wrote:

How about something like this:

Sub ClearRoutine()
Dim theRange As Range
Dim cCell As Range, nRow As Double, nCol As Double

Set theRange = ActiveSheet.UsedRange

' Start from the bottom row and move upward
For nRow = theRange.Rows.count To 2 Step -1

' Ignore cells in top row of selection
For nCol = 1 To theRange.Columns.count

' Don't bother if it's already blank
If Len(theRange.Cells(nRow, nCol).Value) 0 Then
If theRange.Cells(nRow, nCol).Value = theRange.Cells(nRow - 1,
nCol).Value Then
' If it matches the cell above, then clear it
theRange.Cells(nRow, nCol).Value = ""
End If
End If

Next nCol

Next nRow
End Sub


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Tasmania" wrote in message
...
I have one excel sheet1 look like the following:

UserName Location Division Software Name Version

Maria.Sigmu Parkade Probation Adobe Reader 7.0
Maria.Sigmu Parkade Probation Lotus Notes 6.5.5
Eric.Bell Parkade IT WebFldrs 1.0
Eric.Bell Parkade IT Adobe Reader 7.0
Eric.Bell Parkade IT Symantec 8.1

I want to create sheet 2 using Excel Macro in the following
format:

UserName Location Division Software Name Version

Maria.Sigmu Parkade Probation Adobe Reader 7.0
Lotus Notes 6.55
Eric.Bell Parkade IT WebFldrs 1.0
Adobe Reader 7.0
Symantec 8.1

I am a novice user in Excel VBA. I greatly appreciate any help.

--
thadi