jono19872006
Board Regular
- Joined
- Mar 13, 2012
- Messages
- 184
Hi
I have a macro that among other things takes the title in a cell - A5 and then adds "Final" onto the end
I have this macro in a central workbook that runs through a whole folder of reports applying the various formats and this formula.
I need to but a key though so my end user can select whether it is to be a "final" or "draft".
The current code that works is: ActiveCell.FormulaR1C1 = "=RC[1]&"" FINAL"""
</SPAN></SPAN>
In my cental workbook that contains the macro on the front i have added a tickbox next to two columns - draft and final, i want to basically say that if the specificed cell next to final say B5 is ticked then do ActiveCell.FormulaR1C1 = "=RC[1]&"" FINAL""" otherwise ActiveCell.FormulaR1C1 = "=RC[1]&"" DRAFT""".
I tried this with an IF statement which gave ActiveCell.FormulaR1C1 = "=RC[1]&"" ""&IF(Draft=""B"",R[-21]C[1],R[-19]C[1])"
but this doesnt pick up as i assume this looks at the active book at the time (nb where it says "draft="B" above this is as i have used a named range.
any help would be appreciated thanks
</SPAN></SPAN>
</SPAN></SPAN>
I have a macro that among other things takes the title in a cell - A5 and then adds "Final" onto the end
I have this macro in a central workbook that runs through a whole folder of reports applying the various formats and this formula.
I need to but a key though so my end user can select whether it is to be a "final" or "draft".
The current code that works is: ActiveCell.FormulaR1C1 = "=RC[1]&"" FINAL"""
</SPAN></SPAN>
In my cental workbook that contains the macro on the front i have added a tickbox next to two columns - draft and final, i want to basically say that if the specificed cell next to final say B5 is ticked then do ActiveCell.FormulaR1C1 = "=RC[1]&"" FINAL""" otherwise ActiveCell.FormulaR1C1 = "=RC[1]&"" DRAFT""".
I tried this with an IF statement which gave ActiveCell.FormulaR1C1 = "=RC[1]&"" ""&IF(Draft=""B"",R[-21]C[1],R[-19]C[1])"
but this doesnt pick up as i assume this looks at the active book at the time (nb where it says "draft="B" above this is as i have used a named range.
any help would be appreciated thanks
</SPAN></SPAN>
</SPAN></SPAN>