![]() |
Combine "Total" and cell contents
I'm creating a macro to do automatic subtotals, and would like to combine the
word "Total" with the product description in another column. Example: Total - Kraft Mac & Cheese 5 Pack. I'm unsure how to get the contents of the cell to combine with "Total". Any help would be greatly appreciated as always! |
Combine "Total" and cell contents
Hi cottager,
I guess what you mean is something like this: Sub test() Range("A2").Select Selection.Formula = "Total - " & Range("A1") End Sub Where cell A1 contains the text 'Kraft Mac & Cheese 5 Pack' cell A2 will now contain 'Total - Kraft Mac & Cheese 5 Pack Obviously you change the cell references to suit. Any problems write right back. Cheers, JF. |
Combine "Total" and cell contents
Thanks for the solution to my problem! Much appreciated.
" wrote: Hi cottager, I guess what you mean is something like this: Sub test() Range("A2").Select Selection.Formula = "Total - " & Range("A1") End Sub Where cell A1 contains the text 'Kraft Mac & Cheese 5 Pack' cell A2 will now contain 'Total - Kraft Mac & Cheese 5 Pack Obviously you change the cell references to suit. Any problems write right back. Cheers, JF. |
All times are GMT +1. The time now is 01:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com