ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I do math on a cell name in formula? (https://www.excelbanter.com/excel-worksheet-functions/6600-how-do-i-do-math-cell-name-formula.html)

Mark Mulik

How do I do math on a cell name in formula?
 
Howdy.

I'm trying to write a formula that would allow me to add a value to
the row number of a cell name. These attempts have been unsuccessful:

=Sheet1!D(4+B4)

So, if the contents of cell B4 were 1, then the formula would add 4+1
and thus reference the contents of cell D5 in Sheet1.

I've also tried it more simply as:

=D(4+1)

and that doesn't work either.

I've also done the math in another cell -- let's call it E7 -- such
that the contents of E7 are =4+1 and then tried this:

=D(E7)

but that didn't work either.

Can this be done?

Thanks.
Mark

N Harkawat

=INDIRECT("Sheet1!"&"D"&(B4+4))

"Mark Mulik" wrote in message
om...
Howdy.

I'm trying to write a formula that would allow me to add a value to
the row number of a cell name. These attempts have been unsuccessful:

=Sheet1!D(4+B4)

So, if the contents of cell B4 were 1, then the formula would add 4+1
and thus reference the contents of cell D5 in Sheet1.

I've also tried it more simply as:

=D(4+1)

and that doesn't work either.

I've also done the math in another cell -- let's call it E7 -- such
that the contents of E7 are =4+1 and then tried this:

=D(E7)

but that didn't work either.

Can this be done?

Thanks.
Mark




Arvi Laanemets

Hi

=OFFSET(Sheet1!D4,1,0)
=INDIRECT("D" & E7)
My advice is to use the first one as first option!


Arvi Laanemets


"Mark Mulik" wrote in message
om...
Howdy.

I'm trying to write a formula that would allow me to add a value to
the row number of a cell name. These attempts have been unsuccessful:

=Sheet1!D(4+B4)

So, if the contents of cell B4 were 1, then the formula would add 4+1
and thus reference the contents of cell D5 in Sheet1.

I've also tried it more simply as:

=D(4+1)

and that doesn't work either.

I've also done the math in another cell -- let's call it E7 -- such
that the contents of E7 are =4+1 and then tried this:

=D(E7)

but that didn't work either.

Can this be done?

Thanks.
Mark




Mark Mulik

Howdy.

I don't really understand how the Indirect function works, but this
did the trick. Excel's help file on Indirect is not very helpful.

Many thanks for the suggestions. I tried the other two that were
posted here, but they didn't have the desired results. This one below
did what I wanted.

"N Harkawat" wrote in message ...
=INDIRECT("Sheet1!"&"D"&(B4+4))


Thanks.
Mark


All times are GMT +1. The time now is 12:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com