Thank you in advance for your help with this, this forum always comes through for me.
Overall I am trying to set the value of 5 cells based on some calculations. The way I have it set up right now, I'm
calculating those values in a function then assigning the value of that function to those cells.
I cannot for the
life of me get it to call the function properly. Any help would be really appreciated!
Dim Oct_Q, May_Q, June_Q, July_Q, Aug_Q, Sep_Q
'~lots more code~
'Run the pattern maker on May-Sep for the flat pattern
Flat(Total_Flow, Oct_Q, Flat)
var = Range("MAY").Value = Flat
'var = Flat
Range(Cells(iRow2 - 9, iCol + 115)).Value = Flat 'doesn't work
Range(Cells(iRow2 - 8, iCol + 115)).Value = Flat 'doesn't work
Range(Cells(iRow2 - 7, iCol + 115)).Value = Flat 'doesn't work
Range(Cells(iRow2 - 6, iCol + 115)).Value = Flat 'doesn't work
Public Function Flat(Total_Flow As Double, Oct_Q As Double, Flat As Double)
Flat = (Total_Flow - Oct_Q) / 5
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines