My main task is to make it possible to press a commandbutton, start a macro that deletes all empty cells in a collumn (which I've done). However I have loads of other cells that contain a formula that is dependent of the cells in the collumn and when an empty cell is deleted those cells miss a reference. I managed to solve this problem by using the INDIRECT-function and it worked however it seems impossible to auto adjust the formulas and i can't enter it manually since there are more than 10000 cells that contain the formulas.
There are six types of different formulas in the cells
=IF(ISERROR(MATCH(INDIRECT("K"&3);$B$3:$B$35);"";"X") (formula for collumns L, N,P, R, T, V)
=IF(COUNTIF($B$3:$B$35;INDIRECT("K"&3))>1;"Dubblett";"") (formula for collumn M,O. Q, S, U, W)
both of these should always have the 3:35but should change collumn one step until collumn G is reached
=IF(COUNTIF($B$38:$B$68;INDIRECT("K"&3))>1;"Dubblett";"")
=IF(ISERROR(MATCH(INDIRECT("K"&3);$B$38:$B$68);"";"X")
same thing here only collumn should be changed
=IF(COUNTIF($B$56:$D$56;INDIRECT("K"&3))>1;"Dubblett";"")
=IF(ISERROR(MATCH(INDIRECT("K"&3);$B$56:$D$56);"";"X")
as wll as here
All formulas are supposed to go down to an INDIRECT("K"&110)
If the problem can be solved using another macro please describe here:
http://www.excelforum.com/excel-prog...ml#post2554689
So is it anyway to auto adjust when using the INDIRECT function?
Bookmarks