if(or(offset HELP

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello

can someone pls help me with the logic/formula for if(or(offset

basically, i have data in range D12:O12
D10:O10 = header (months, Jan-Dec)

issue with formula:
=IF(OR(D12:O12=0),OFFSET(D10:O10,-2,))

basically, i want the formula to work so, if the any of the cells in range D12:O12 = 0, then offset the last row by -2 (jump by two rows)

i.e.
Jan Feb Mar Apr May June
100 200 300 400 200 0

so my answer would be, June

can someone pls help!!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
=INDEX(D10:O12,1,MATCH(0,D12:O12,0))

this is an array formula you have to type it then push ctrl+shift+enter after you enter it you should see

{=INDEX(D10:O12,1,MATCH(0,D12:O12,0))}
 
Upvote 0
oh thxs so much buddy

one request, the formula works great, but its going to the zero like i mentioned, however, is it possible for it to go one back?

for example
right now i have some YTD data for august

so i would like for the formula to go to august; right now its going to september
i.e. in the range D12:O12, go to last active row (prior to zero) and go up 2 rows to get month?

is it possible to make it go to last figure that is zero and to back one? thx u so much
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,572
Members
452,927
Latest member
whitfieldcraig

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