Exzcel VBA dynamic range

Microsoft Excel 2007
August 1, 2009 at 10:13:09
Specs: Windows Vista
I am trying to write code (newbie here) to allow me to process the 1st 500 rows of an excel spreadsheet and replace certain cell values using a dynamic raning scheme:

Dim intCredit As Integer
Dim strC As String
Dim strD As String
Dim strE As String
Dim Cx, Ex, Dx As String

For x = 1 To 500
Cx = "C" & Str(x)
Ex = "E" & Str(x)
Dx = "D" & Str(x)
Range(Cx:Cx).Select 'Select Impression/Click Cell
strC = ActiveCell.Value
Range("Ex").Select 'Select Start Date Cell
strE = ActiveCell > Value
strD = ActiveCell.Value

If strC > 3 And strE = "" Then
ActiveCell.Value = strD
End If

I want to process the 12st range, then the 2nd then the 3rd..etc down to #500. What is the proper format for the range command to accomplish this?

Thanks for your help!

See More: Exzcel VBA dynamic range

Report •

August 2, 2009 at 09:17:41
I'm not entirely sure what you're trying to accomplish here. Try breaking down the steps, in English instead of VBA.

Report •
Related Solutions

Ask Question