Excel - changing column reference based on value of other column

D

Dharmesh Patel

I am having a data in one of the worksheet, say "X"
in "Y", what I am trying to do is select particular column values of "X"
based on some value of column "Y"

so it says, value of 'Y'!F5, with 'X'!A3, where A3=5(row number of 'Y'!F5),
now value of 'X'!A4='Y'!F('X'!A3)='Y'!F5

why I wants this is because when I change A3=6, I want 'X'!A4='Y'!F6

Any Idea how to do this?
 
J

Jacob Skaria

Try
=INDIRECT("'Y'!F" & X3)

Y is sheet name
F is column
Row number specified in cell X3 of the current sheet

If this post helps click Yes
 
D

Dharmesh Patel

Hi Jacob,

this worked perfectly, thanks a lot.

a small query, if its possible to do further modification to below formula?
=INDIRECT("'Y'!F" & (X3+5))

mean, wants to add 5 to value of X3, means it can refer colum F10 in one
instance, in another it will refer F15.

thanks in advance.

with Regards,

- Dharmesh
 
J

Jacob Skaria

Your fomula is correct...Try
X3 = 5
The below will refer F10
=INDIRECT("'Y'!F" & X3+5)

If this post helps click Yes
 
D

Dharmesh Patel

Hi Jacob, this also worked fine.
thanks for the help.

with Regards,

- Dharmesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top