简体   繁体   中英

Row in formula change based on value in another cell

I'm trying to create a paragraph in excel. I have values listed in another sheet that I want to pull from.

Here is the code I'm using:

=CONCATENATE("Dear ",'Linkage Log'!I6,", "Blah Blah Blah")

I want the column I to change the same, but I'm trying to have it so that the 6 changes depending on a value I type in another cell (eg E8). So if I type 7 in the cell, the formula will change to:

=CONCATENATE("Dear ",'Linkage Log'!I7,", "Blah Blah Blah")

Is this possible?

I'm not trying to generate mail, so a mail merge isn't really helpful to me.

Thanks for your help!

You should be able to use the INDIRECT worksheet function to achieve that. So eg if cell A1 contains the value 7, your formula would be

=CONCATENATE("Dear ",INDIRECT("'Linkage Log'!I"&A1), "Blah Blah Blah")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM