SimonGeoghegan
Board Regular
- Joined
- Nov 5, 2013
- Messages
- 68
Hi All,
I have some code which creates a "score" line within my spreadsheet. I need this formula to change each time I run my macro, as the number of questions it relates to is variable.
I have the formula:
Essentially, the "B$30","$A$30" both need replacing to the value of the last row instead of being a fixed value.
Can anyone advise how I'd go about this? I know that my code is just placing a pre-determined text at the minute so expecting I'll need to re-do the entire formula in a different way rather than simply replacing the above references.
Regards,
Simon
I have some code which creates a "score" line within my spreadsheet. I need this formula to change each time I run my macro, as the number of questions it relates to is variable.
I have the formula:
Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Range("B" & LastRow + 3).Value = "=SUM(COUNTIF(B$8:B$30,""Yes"")/SUM(COUNTA($A$8:$A$30)-COUNTIF(B$8:B$30,""N/A"")))"[/FONT]
Essentially, the "B$30","$A$30" both need replacing to the value of the last row instead of being a fixed value.
Can anyone advise how I'd go about this? I know that my code is just placing a pre-determined text at the minute so expecting I'll need to re-do the entire formula in a different way rather than simply replacing the above references.
Regards,
Simon