Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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
Range("Dx").Select
strD = ActiveCell.ValueIf strC > 3 And strE = "" Then
Range("Ex").Select
ActiveCell.Value = strD
End If
NextI 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!

I'm not entirely sure what you're trying to accomplish here. Try breaking down the steps, in English instead of VBA.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |