Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.