Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88030

How do I copy a cell formula by reference (or evaluate a cell formula)?

$
0
0

Data: a set of cells B2:B9 with numbers.

Result: kept in C2:C9, where I apply some formula to the relative cell on the left (e.g. C2 depends on B2, C3 depends on B3, etc.).

The formula can be, for example:

C2: = B2+1

or

C2: = B2*B2

Normally, I'll define a formula in C2, and copy it to C3:C9. But any change to the formula would require copying it again.

I'd like to keep the formula in a cell, say C1, and use it in C2:C9. The obvious solution is to define a VBA function. But I don't want to use VBA (if there was a builtin python, then maybe). Instead, I have the simple excel cell formula, and it's convenient.

There's the evaluate function, but I can't supply a parameter, such as the relative cell.


Viewing all articles
Browse latest Browse all 88030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>