Computing.Net > Forums > Programming > Exzcel VBA dynamic range

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Exzcel VBA dynamic range

Reply to Message Icon

Name: harry96794
Date: August 1, 2009 at 10:13:09 Pacific
OS: Windows Vista
Product: Microsoft Excel 2007
Subcategory: General
Comment:

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.Value

If strC > 3 And strE = "" Then
Range("Ex").Select
ActiveCell.Value = strD
End If
Next

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!



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: August 2, 2009 at 09:17:41 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Exzcel VBA dynamic range

buil dynamic range processor www.computing.net/answers/programming/buil-dynamic-range-processor/3877.html

Dynamic Ranges/Input Masks www.computing.net/answers/programming/dynamic-rangesinput-masks/3295.html

Automate X and Y range in excel sca www.computing.net/answers/programming/automate-x-and-y-range-in-excel-sca/16318.html