Formula with INDEX and IF

Neil_R

New Member
Joined
Jun 18, 2019
Messages
5
I have a fairly simple formula that I am trying to amend so that inserting a line does not cause the cell values to change using the INDEX command. The formula I was using was:

=IF(E6>0, E6, 0)

Which I have updated to:

=IF(INDEX(C:E,3,3>0),INDEX(C:E,3,3,0))

This produces a #VALUE error so I am obviously have the formatting wrong but cant get my head around what to change, can anyone help?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
That IF INDEX combination is always true so you will always return INDEX(C:E,3,3) I.e. the 3rd row and 3rd column of C:E (E3)

It is nested incorrectly hence the error,

It would look like:
=IF(INDEX(C:E,3,3>0),INDEX(C:E,3,3),0)

Though this looks a bit weird to me!!
 
Upvote 0
If you want E6 it should be
=IF(INDEX(C:E,6,3)>0,INDEX(C:E,6,3),0)
 
Upvote 0
I think it should look more like:

=IF(INDEX(C:E,6,3)>0,INDEX(C:E,6,3),0)

Change the 6 to 3 if you really meant to say E3 in your description.
 
Upvote 0
Whats behind the decision to use index thats just pointing at a fixed cell?
 
Upvote 0

Forum statistics

Threads
1,214,384
Messages
6,119,201
Members
448,874
Latest member
Lancelots

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