ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel - changing column reference based on value of other column (https://www.excelbanter.com/excel-discussion-misc-queries/245222-excel-changing-column-reference-based-value-other-column.html)

Dharmesh Patel

Excel - changing column reference based on value of other column
 
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?

Jacob Skaria

Excel - changing column reference based on value of other column
 
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
---------------
Jacob Skaria


"Dharmesh Patel" wrote:

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?


Dharmesh Patel[_2_]

Excel - changing column reference based on value of other colu
 
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

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Dharmesh Patel" wrote:

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?


Jacob Skaria

Excel - changing column reference based on value of other colu
 
Your fomula is correct...Try
X3 = 5
The below will refer F10
=INDIRECT("'Y'!F" & X3+5)

If this post helps click Yes
---------------
Jacob Skaria


"Dharmesh Patel" wrote:

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

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Dharmesh Patel" wrote:

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?


Dharmesh Patel[_2_]

Excel - changing column reference based on value of other colu
 
Hi Jacob, this also worked fine.
thanks for the help.

with Regards,

- Dharmesh

"Jacob Skaria" wrote:

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

If this post helps click Yes
---------------
Jacob Skaria


"Dharmesh Patel" wrote:

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

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Dharmesh Patel" wrote:

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?



All times are GMT +1. The time now is 04:49 PM.

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