Hi All
I am using the code below to paste the formula in a cell. I am so very close. I can't get ="" to paste.
The pasted formula that I'm trying to achieve: =IF(C4="",F3+CK3,IF(C3="",F3,IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI4,Instruments!AA$3:AA$68,0))+F3,"")))
I need C4="" and C3=""
The above code results: =IF(C4=",F3+ CK3,If(C3=",F3,IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI4,Instruments!AA$3:AA$68,0))+F3,""))
The above code with double "" results in a runtime error "Method formula of object range failed.
I thought for sure this would work:
The above code results: =IF(C4=",F3+ CK3,If(C3=",F3,IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI4,Instruments!AA$3:AA$68,0))+F3,""))
Again, I need C4="" and C3=""
Spent 2 hrs trying to figure this out.
Thanks in advance! Taking a long break.
I am using the code below to paste the formula in a cell. I am so very close. I can't get ="" to paste.
The pasted formula that I'm trying to achieve: =IF(C4="",F3+CK3,IF(C3="",F3,IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI4,Instruments!AA$3:AA$68,0))+F3,"")))
I need C4="" and C3=""
Code:
Target.Formula = "=IF(C" & ActiveCell.Row & "="",F" & ActiveCell.Row - 1 & "+ CK" & ActiveCell.Row - 1 & ",If(C" & ActiveCell.Row - 1 & "="",F" & ActiveCell.Row - 1 & ",IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI" & ActiveCell.Row & ",Instruments!AA$3:AA$68,0))+F" & ActiveCell.Row - 1 & ",""""))"
The above code results: =IF(C4=",F3+ CK3,If(C3=",F3,IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI4,Instruments!AA$3:AA$68,0))+F3,""))
Code:
Target.Formula = "=IF(C" & ActiveCell.Row & "="""",F" & ActiveCell.Row - 1 & "+ CK" & ActiveCell.Row - 1 & ",If(C" & ActiveCell.Row - 1 & "="""",F" & ActiveCell.Row - 1 & ",IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI" & ActiveCell.Row & ",Instruments!AA$3:AA$68,0))+F" & ActiveCell.Row - 1 & ",""""))"
The above code with double "" results in a runtime error "Method formula of object range failed.
I thought for sure this would work:
Code:
Target.Formula = "=IF(C" & ActiveCell.Row & "=""" & ",F" & ActiveCell.Row - 1 & "+ CK" & ActiveCell.Row - 1 & ",If(C" & ActiveCell.Row - 1 & "=""" & ",F" & ActiveCell.Row - 1 & ",IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI" & ActiveCell.Row & ",Instruments!AA$3:AA$68,0))+F" & ActiveCell.Row - 1 & ",""""))"
The above code results: =IF(C4=",F3+ CK3,If(C3=",F3,IFERROR(INDEX(Instruments!Z$3:Z$68,MATCH(CI4,Instruments!AA$3:AA$68,0))+F3,""))
Again, I need C4="" and C3=""
Spent 2 hrs trying to figure this out.
Thanks in advance! Taking a long break.