How to run IF function in a loop or any other solutions?

shalomfern

New Member
Joined
Nov 21, 2016
Messages
6
I want to refer to the last date of the data set and make the cell value move UP until cell value is equal to text or in this case "BRL"

If it is text, I want excel to run the formula in BLUE, otherwise I want excel to move up the column until it finds a text.

=IF(ISTEXT(A9); VLOOKUP('Transport Rates'!$A6; MDshowrooms!$C$5:$F$30; 4); OFFSET(A11; -1; 0; 1; 1))

but with this formular, it only moves once. it doesnt keep checking the new cell value.


BRL
09.01.2010
02.02.2010
14.02.2010
16.02.2010
17.03.2010
04.04.2010
07.04.2010
19.04.2010

<tbody>
</tbody>
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I think this should work for you
assuming column A is the column you want the rows to change in:

for i = 9 to (what ever row you want to check until)
=IF(ISTEXT("A" & i); VLOOKUP('Transport Rates'!$A6; MDshowrooms!$C$5:$F$30; 4); OFFSET(A11; -1; 0; 1; 1))
next
 
Upvote 0
I should have mentioned earlier, I suck at macros or advanced excel

it would be a great help if you can guide me where to include the formula you mentioned

thanks for you help
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

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