So Sorry Luke. I'm afraid I may be flustering you. Maybe I can explain it better. My data set is comprised of approximately 48 colums and 10,500 rows. Columns A and B are essentially small project construction projects. Column A indicates the type of construction (A, B, C, F, N, etc.). Column B has the project number. None are the same.
I inserted a blank column in column C...shoving the rest of the columns offset 1 column (i.e., (0,1)). Within the empty Column C I inserted a loop and a formula to concatenate columns A and B. All the way down the bottom of the 10,000+ rows.
Now, I wish to COUNTa and display the total of all the cells in column C...giving me the total number of open projects.
Your most recent reply used the concatenate formula which I was able to get working yesterday. However, I have been unable to produce code that will count the occupied rows above and display the count in the first empty cell at the bottom of the column.
I call this range as being variable in that every week the number of projects fluctuate from week to week.
HERE IS THE CODE AGAIN
' This part works - CONCATENATE
For i = 1 To Selection.CurrentRegion.Rows.Count - 1
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-2],RC[-1])"
ActiveCell.Offset(1, 0).Select
Next i
End Sub
'NEED CODE FOR COUNTA RIGHT AFTER THE CONCATENATE FORMULA LOOP AVE
' Do I need some type of break here between the concatenate and the counta portions. Like End For, etc.
'THE CODES BELOW DID NOT WORK
'Sets formula all in one shot, no need for loop
'Range(Cells(2, "C"), Cells(xrow, "C")).FormulaR1C1 = _
' "=Counta(RC[-2],RC[-1])"
'Cells(xrow + 1, "C").Value = _
WorksheetFunction.CountIf(Range(Cells(2, "C"), Cells(xrow, "C")), "<>")
' Cells(Rows.Count, 1).End(xlUp).Select
' Range("C1").Offset(1, 0).Select
' Selection.End(xlDown).Select
' ActiveCell.Offset(1, 0).Select
' Range(Selection, Selection.End(xlDown)).Select
'Range(Selection, Selection.End(xlUp)).Select
'ActiveCell.Formula = "=counta "
'ActiveCell.FormulaR1C1 = "=COUNTA(Range(Selection, Selection.End(xlDown)).SelectSelect"
'This loop runs as long as there is something in the next column
'Do While Not IsEmpty(ActiveCell.Offset(0, -1))
'ActiveCell.Formula = "=CONCATENATE(a2, b2)"
'ActiveCell.Offset(1, 0).Select
'Loop
'i = "B2"
'If "i" > "" Then
'ActiveCell.Formula = "=CONCATENATE(a2,b2)"
'Else
'End If
Also, when I concatenate the cells in columns A and B do I have to cut and paste values??