I spent the better part of the day trying to get this code to work. I was hoping someone could take a glance at it and point out what stupid mistake i've made.
My main problem is, I want to use my variable as a column reference but cannot seem to get it into the correct format to accept it as a variable. I spent a large portion of my time trying to find a solution online and it seems like whats called RC is what people use but I cannot seem to follow that style very well.
If I made a mistake posting this incorrectly or something to that nature, let me know and I will change it immediately. Sorry in advance I am new here
Dim c
C=1
Sheets(“Series Formatted Data”).Select
Do While Cells(1,c) <>””
If Cells(1,C) =”MRP” Then
Sheets("Sheet1").Cells(2, 11).Formula = "= Average(‘Series Formatted Data’!C:C)"
Elseif Cells(1,C) =” EC_Io” then
Sheets(“Sheet1”).Cell(2,12).Formula = “=Average(‘Series Formatted Data’!C:C)”
Elseif Cells(1,C) = “MTP” Then
Sheets(“Sheet1).Cell(3,12).Formula = “=Average(‘Series Formatted Data’!C:C)”
c=c+1
loop
I left out some of the other parts of the code since the part im really stuck on is making the C a variable not a column reference.
Bookmarks