I have an excel spreadsheet with formulas using if statement based on values in cells. Each formula is for answers to the same question, with the same answer and on the same row but with 52 different columns. I'm currently using VIM as a text editor to replace the row numbers and answers in each formula and then pasting the formula into excel. I'm wondering if there is a straightforward way to do this with a macro. Please see examples of fomulas below:
=IF(AND('Ben&Survey_Respon
ses'!C39="
YES", 'Ben&Survey_Responses'!C26
="M"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!D39="Y
ES", 'Ben&Survey_Responses'!D26
="M"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!E39="Y
ES", 'Ben&Survey_Responses'!E26
="M"),1,0)
+
IF(AND('Ben&Survey_Respons
es'!F39="Y
ES", 'Ben&Survey_Responses'!F26
="M"),1,0)
+ . . .
=IF(AND('Ben&Survey_Respon
ses'!C39="
YES", 'Ben&Survey_Responses'!C26
="F"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!D39="Y
ES", 'Ben&Survey_Responses'!D26
="F"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!E39="Y
ES", 'Ben&Survey_Responses'!E26
="F"),1,0)
+
IF(AND('Ben&Survey_Respons
es'!F39="Y
ES", 'Ben&Survey_Responses'!F26
="F"),1,0)
+ . . .
=IF(AND('Ben&Survey_Respon
ses'!C39="
NO", 'Ben&Survey_Responses'!C26
="M"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!D39="N
O", 'Ben&Survey_Responses'!D26
="M"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!E39="N
O", 'Ben&Survey_Responses'!E26
="M"),1,0)
+
IF(AND('Ben&Survey_Respons
es'!F39="N
O", 'Ben&Survey_Responses'!F26
="M"),1,0)
+ . . .
=IF(AND('Ben&Survey_Respon
ses'!C45="
YES", 'Ben&Survey_Responses'!C26
="M"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!D45="Y
ES", 'Ben&Survey_Responses'!D26
="M"),1,0)
+ IF(AND('Ben&Survey_Respons
es'!E45="Y
ES", 'Ben&Survey_Responses'!E26
="M"),1,0)
+
IF(AND('Ben&Survey_Respons
es'!F45="Y
ES", 'Ben&Survey_Responses'!F26
="M"),1,0)
+ . . .
Thanks,
Brandon
Start Free Trial