VBA Code

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>
 

Some videos you may like

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Watch MrExcel Video

Forum statistics

Threads
1,122,518
Messages
5,596,622
Members
414,082
Latest member
sasmita

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top