What I am trying to do is count how many cells have data and then drop in formulas in some cells to the right, according to how many cells I have counted as NOT being empty. Attached is a picture that may more clearly explain what I am trying to do.
There must be a better way to do this... because what I have isn't working this is where my macro is running into problems:
...
' COUNT THE NUMBER OF CUSTOMERS AND SAVE AS A VARIABLE
Range("B2").Select
Do While IsEmpty(ActiveCell.Value) Or ActiveCell.Value = ""
custCount = custCount + 1
n = n + 1
ActiveCell.Offset(1, 0).Select
Loop
' MsgBox "n = " & n & " ..... custCount = " & custCount, vbInformation, "VARIABLES AFTER WHILE LOOP"
' MsgBox "C" & custCount, vbInformation, "Test"
' FILL CARRIER CELLS WITH FORUMLAS AND QUANTITY CELL WITH 1s
For n = 0 To custCount
Range("C2", "C" & custCount).Select
ActiveCell.FormulaR1C1 = "1"
n = n + 1
Next n
Bookmarks