View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default ive been stuck for 2 days

and for yet another sample:

Option Explicit

Sub mediatenyc()

Dim MyLastRow As Long
Dim MyRange As Range
Dim StartRow As Long
Dim MyRow As Long
Dim i As Long

MyLastRow = Cells(20000, 1).End(xlUp).Row

Set MyRange = Range("a1:o" & MyLastRow)

i = 1

Do While i < MyLastRow
If Range("a" & i) = "" Then
MyRow = i
Range("o" & MyRow).Clear
End If
i = i + 1
Loop

End Sub


On Jan 29, 12:45 pm, "Chip Pearson" wrote:
Try

Sub AAA()
Dim Rng As Range
Dim SaveCalc As XlCalculation
SaveCalc = Application.Calculation
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
For Each Rng In Range("A2:A5002").SpecialCells(xlCellTypeConstants )
If Rng.Value = vbNullString Then
Rng.EntireRow.Cells(1, "O").Value = vbNullString ' letter 'O'
not number 0.
End If
Next Rng
Application.Calculation = SaveCalc
Application.ScreenUpdating = False
Application.EnableEvents = True
End Sub

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLCwww.cpearson.com
(email address is on the web site)

wrote in ooglegroups.com...



i have a single page worksheet with various information that
automaticly changes and sorts based on another worksheet. whith that
said here is my issue


i need a script that checks wether there is information in colum (A).


if there is information in (A) then leave (O) alone. if not then clear
(O)


example if (A7) = blank, clear (O7)


my range is (A2:A5002) and (O2:O5002)


any insight would be great- Hide quoted text -- Show quoted text -