Take the 2-minute tour ×

I am a newbie @ VBA. I want to use the value of a formula in the active cell to feed into another formula (a sum where the active cell sets the limit of the colum rows to be included in the sum).

Should I use Activecell.value or something else?

share|improve this question

2 Answers 2

Yes, if that is really what you want.

However, the ActiveCell is easily, accidentally changable by the user so you might want to consider using a fixed cell reference such as:

share|improve this answer

I would get the range passed to the function, as in =MyFunc(A1) in the excel sheet, and use that information in my formula

Function MyFunc(rng As Range) As Double
MyFunc = rng.Value * 3
End Function

That way, I know exactly what cell my function is getting the data from

share|improve this answer

Your Answer


