# Help on use of INDIRECT command please

#### ShearJohn

##### New Member
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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
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?

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

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,

Ian Mac,

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

John

Replies
3
Views
679
Replies
9
Views
2K
Replies
6
Views
1K
Replies
6
Views
425
Replies
2
Views
300

1,218,888
Messages
6,145,016
Members
450,585
Latest member
airc72

### 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.

### Which adblocker are you using?

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

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