SOLVED

Changing cell reference in a formula using contents of another cell

Copper Contributor

I have a simple formula:  =D13801/Calibration!$G$48

The first part is a cell reference on my current page.  What I need is for that digit at the end, 48 in this example, to be the contents of a different cell, so I don't have to type that number into each line as needed.  I'm using the same digit for three hundred consecutive lines, then it ticks up by 1, then another three hundred lines, etc.

I already have a column set up with the correct sequence of digits I want to appear at the end of the formula in each row, I just don't know how to use the contents of those cells in the formula.  Typing them in by hand on each line is far too time consuming, as they are many.

I thought I might be on the right track with the INDIRECT function, but couldn't get it to work.  Maybe my syntax is wrong, or maybe it doesn't actually work the way I think it does.

Thank you.

7 Replies
You must at least provide a list of your formulas, if you cannot, for any reason, attach your sample file.

Thank you for responding.

I typed a sample formula into the original comment.  I just have that one to work with.  I will attach the file I'm working with, but there's a lot of other stuff in it.  If you look at the tab called <Data 300 Counts> and look down column G, you can see what I'm trying to do.  I've done a number of entries by brute force, but it would take me a long time to get through them all doing a copy/paste with a typed edit once each 300 rows.

I want the first cell (in the formula in column G on <Data 300 Counts>) to increment by one as I copy the formula down the column, but I only want the digit on the end to increment by 1 once each 300 rows.

Thank you for the help.


I already have the digits I want on the end of the formula, in the cells in column H, but I don't know how to concatenate those onto the end of the formulas in column G and have it accept it as part of the formula string.

best response confirmed by Craig_Gallagher (Copper Contributor)
Solution

Instead of D1/Calibration!$G$2, use this formula in G1, copied down rows:
=D1/INDEX(Calibration!G:G,
CEILING(ROW(),300)/300+1)
The divisor in the foregoing formula becomes Calibration!G2 for G1:G300, Calibration!G3 for G301:G600, Calibration!G4 for G601:G900, and so forth.

Yes, that worked. Thank you!

I had been wondering if there were a way to just have the increment, as you go from one row to the next, be 300 instead of 1, and that's done it.

I will study the INDEX and CEILING functions to follow what you've done here.
I meant have it only increment once every 300 rows.
1 best response

Accepted Solutions
best response confirmed by Craig_Gallagher (Copper Contributor)
Solution

Instead of D1/Calibration!$G$2, use this formula in G1, copied down rows:
=D1/INDEX(Calibration!G:G,
CEILING(ROW(),300)/300+1)
The divisor in the foregoing formula becomes Calibration!G2 for G1:G300, Calibration!G3 for G301:G600, Calibration!G4 for G601:G900, and so forth.

View solution in original post