Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

cells referencing 2

Status
Not open for further replies.

abalkees

Mechanical
Apr 17, 2013
3
Hi,

I want to create a column of cells like following:

=M2
=M7
=M12
.
.
.
=M252

As you can see each of these =M references to a cell which comes after 5 cells of the previous one.

How can I do that without entering all these =M.. one by one?

Many Thanks
Alaa
 
Replies continue below

Recommended for you

There may be more elegant ways, but type this into your first cell and then copy it down:
=OFFSET($M$2, 5*(ROW(M2)-ROW($M$2)), 0, 1, 1)

=====================================
(2B)+(2B)' ?
 
I don't have time to quickly type out anything correct, but look into the INDIRECT function. You can make cell references out of cell contents, literal strings, whatever.

Best to you,

Goober Dave

Haven't see the forum policies? Do so now: Forum Policies
 
Offset as shown above works. You might be able to do similar thing as offset using the index function or the row function or maybe the address function.

Indirect would require you to populate additional cells with addresses (that will be accessed by indirect formula in another cell). Could accomplish the same thing but wouldn't be my personal choice.

=====================================
(2B)+(2B)' ?
 
@ electricpete

your formula worked well.

Many Thanks all
Alaa
 
Offset and Index do similar things. Offset is a bit more flexible, but I tend to use Index, because that's what I grew up with.

Also I normally generate a column of index (or offset) numbers using a simple formula (=Cell above + 1), rather than using the Row function, just to keep things simple.

Just different ways of doing the same thing.

Doug Jenkins
Interactive Design Services
 
Thanks electricpete, that's a neat way. Where were you two months ago when I needed it?

Best to you,

Goober Dave

Haven't see the forum policies? Do so now: Forum Policies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor