Want cell references to reset if IF logic test is true

reasem

New Member
Joined
Nov 15, 2019
Messages
38
Hello, I'm looking for a formula where the formula in the true part of the IF statement will only start if the test results in blank (""). What I mean by this is that I'm using a cell reference (AD2) in my formula for the true part of the statement and when I drag my formula down the AD2 will change into something like AD35. I know this is how excel works but I'm looking for the formula to "reset" at AD2 if the logical test returns a blank.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I did not understand well.
You can put your formula.
You can give an example if the result is blank ("") then what should the formula get; and if the result is different from blank ("") then what result should the formula get.
You can paste a sample of data here to explain more clearly what you require.
 
Upvote 0
Here is an example of the formula on line 35 of my array if you will. This IF statement should be true--I now want the "row" in the index function (bolded) to start at AD2. I need the formula to be uniform as the data I'm using will change so I can't change it to AD2 manually.

=IF(IFERROR(INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AB35,4),"")="",INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AD35,4),IFERROR(INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AB35,4),""))
 
Upvote 0
I'm trying to understand.
If the result is "", then AD2

=IF(IFERROR(INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AB35,4),"")="",INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AD$2,4)

In which case should it be AD35?
 
Upvote 0
I'm trying to understand.
If the result is "", then AD2

=IF(IFERROR(INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AB35,4),"")="",INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AD$2,4)

In which case should it be AD35?
I'm trying to understand.
If the result is "", then AD2

=IF(IFERROR(INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AB35,4),"")="",INDEX('AMAs on File'!$2:$1048576,'AMAs on File'!$AD$2,4)

In which case should it be AD35?
Almost. I want the formula to start at AD2 if the statement is true. The formula is dragged down to line 100. The next formula should be AD3 then AD4 and so on
 
Upvote 0
if the statement is true

If the statement is true, If you drag the formula then keep $AD$2 ...
Then at some point the result of the formula will be false ...
If you drag the formula then it must be D3, D4 ...


I'm thinking it would be possible but with a macro.
1. Select the cells where you want the formula.
2. Press a button to run the macro.
3. The macro would evaluate if the statement is true, then create the formula with $D$2.
4. If the evaluation of the statement is false then the macro would create the formula with D3, D4 ... until the cell you have selected.

Something like that you need?
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,721
Members
449,093
Latest member
Mnur

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