Hi, I wonder whether someone may be able to help me please.
I'm using the code below to count values from one sheet pasting them into another.
Sub CountProjects() Dim y As Long y = 0 Sheets("Output").Activate For Each rcell In Range("C7:W7") Sheets("In Flight Projects").Activate Range("F8").Select Do Until ActiveCell = "" If ActiveCell.Value >= rcell.Value Then y = y + 1 ActiveCell.Offset(1).Select Loop rcell.Offset(1).Value = y Sheets("Output").Activate y = 0 Next rcell End Sub
The code works fine, but I'm trying to make a slight change to this, but I'm unsure how to proceed.
The issue is this line of the code:
This range selects the column header row and I still like to start from column C but end when it comes to the first blank column header.
I just wondered whether someone could possibly look at this please and offer some guidance on how I may go about achieving this.
Many thanks and kind regards