Ok...quick question or maybe not so quick, i'm trying to install a long formula in to a run macro that will simply pull the cell all the way across the spreadsheet and down, the fomula is:
=IF(ISERROR(IF(AND(AP$1>=DATE(LEFT($AB2,4),MID($AB2,5,2),RIGHT($AB2,2)),AP$1<=DATE(LEFT($AC2,4),MID($AC2,5,2),RIGHT($AC2,2))),$AO2/$AD2,"")),"",IF(AND(AP$1>=DATE(LEFT($AB2,4),MID($AB2,5,2),RIGHT($AB2,2)),AP$1<=DATE(LEFT($AC2,4),MID($AC2,5,2),RIGHT($AC2,2))),$AO2/$AD2,""))
It was the one below...but the sheet changes size lengthwise and I needed something that wouldn't show value signs if the data the macro was using wasn't there...
=IF(AND(AP$1>=DATE(LEFT($AB2,4),MID($AB2,5,2),RIGHT($AB2,2)),AP$1<=DATE(LEFT($AC2,4),MID($AC2,5,2),RIGHT($AC2,2))),$AO2/$AD2,"")
When i imput the information and drag and pull it across it works, but it will not use the formula in the macro...i even tried imputting the formula directly into VBA but when vba takes the formula it converts it to
=IF(ISERROR(=IF(AND(R1C[37]>=DATE(LEFT(R[-7]C28,4),MID(R[-7]C28,5,2),RIGHT(R[-7]C28,2)),R1C[37]<=DATE(LEFT(R[-7]C29,4),MID(R[-7]C29,5,2),RIGHT(R[-7]C29,2))),R[-7]C41/R[-7]C30,""""),=IF(AND(R1C[37]>=DATE(LEFT(R[-7]C28,4),MID(R[-7]C28,5,2),RIGHT(R[-7]C28,2)),R1C[37]<=DATE(LEFT(R[-7]C29,4),MID(R[-7]C29,5,2),RIGHT(R[-7]C29,2))),R[-7]C41/R[-7]C30,""""))
which is the formula it converts the basic formula to, I tried to duplicate the basic formula to the longer formula using the above translation and it didn't work..please help...
Bookmarks