Excel Indirect function with relative row numbers

London 007

New Member
Joined
Mar 9, 2013
Messages
3
I am not very good at Excel. I have a problem:

I have written the following formula in cell J5
=IF(AND(INDIRECT("AF5")<0,INDIRECT("AF5")<INDIRECT("AJ5")),"N",IF(AND(INDIRECT("AF5")<0,INDIRECT("AF5")>INDIRECT("AJ5")),"W",""))

<colgroup><col></colgroup><tbody>
</tbody>

However, when I copy the formula to cell J6 the formula remain the same!

After I have copied the formula to from J5 to J6 I would like the rows numbers to change automatically, i.e.:
=IF(AND(INDIRECT("AF6")<0,INDIRECT("AF6")<INDIRECT("AJ6")),"N",IF(AND(INDIRECT("AF6")<0,INDIRECT("AF6")>INDIRECT("AJ6")),"W",""))

Is this possible?

Thanks

James
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Welcome to MrExcel.

Try:

=IF(AND(INDIRECT("AF"&ROW(J5))<0,INDIRECT("AF"&ROW(J5))("AJ"&ROW(J5))),"N",IF(AND(INDIRECT("AF"&ROW(J5))<0,INDIRECT("AF"&ROW(J5))>INDIRECT("AJ"&ROW(J5))),"W",""))
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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
Back
Top