Help on use of INDIRECT command please

ShearJohn

New Member
Joined
Sep 8, 2002
Messages
16
Having been pointed at this command im having a little problem that you may be able to help me out with.

I have a formula in a cell part of which is

=INDIRECT((CHAR(CODE(B1)+1))&A6-1)

Where B1 is the column letter and A6 is the row number. Although probably very inelegant it does what I want it to up to row Z, after this it understandably goes awry. I cant seem to get the formula to work in the Excel R1C1 set up.(This might be because I use it so infrequently and dont understand it that well). Any help appreciated.

Thanks

John
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Ian Mac

MrExcel MVP
Joined
Feb 20, 2002
Messages
1,174
On 2002-09-10 02:10, ShearJohn wrote:
Having been pointed at this command im having a little problem that you may be able to help me out with.

I have a formula in a cell part of which is

=INDIRECT((CHAR(CODE(B1)+1))&A6-1)

Where B1 is the column letter and A6 is the row number. Although probably very inelegant it does what I want it to up to row Z, after this it understandably goes awry. I cant seem to get the formula to work in the Excel R1C1 set up.(This might be because I use it so infrequently and dont understand it that well). Any help appreciated.

Thanks

John

Hi,

Welcome to the board,

First I have a question,
IF I put D in B1 and 3 in A6, the reference I'm actually refering to is E2,
I was just wondering why this is?
 

ShearJohn

New Member
Joined
Sep 8, 2002
Messages
16
Ian,

Thanks for the welcome, I didnt put the whole of the formula as some of it actualy works. The reason this bit does as you say is because it is part of an IF statement and differect cells need pointing to depending on the outcome. I hope that made sense!

Cheers
John
 

Ian Mac

MrExcel MVP
Joined
Feb 20, 2002
Messages
1,174
On 2002-09-10 02:20, ShearJohn wrote:
Ian,

Thanks for the welcome, I didnt put the whole of the formula as some of it actualy works. The reason this bit does as you say is because it is part of an IF statement and differect cells need pointing to depending on the outcome. I hope that made sense!

Cheers
John

Still not sure,

but the following will do the same thing for you:

=OFFSET($A$1,A6-2,B1,1,1)

This will allow you to input numbers in B1 to reference the Columns as the B1 is just the number of columns to offset (also why you don't need +1 and you need -2 for the rows)

Regards,
 

ShearJohn

New Member
Joined
Sep 8, 2002
Messages
16
Ian Mac,

Sorry I didnt explain myself to well but you have more than adequately solved my problem, many thanks.

John
 

Forum statistics

Threads
1,144,510
Messages
5,724,774
Members
422,576
Latest member
kayth891

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top