Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine text from multiple cells into one cell - =(A1&","&A2","&A3 mh Excel Worksheet Functions 5 July 27th 09 02:40 AM
Convert cell "contents" into a "comment" Ryan Excel Discussion (Misc queries) 4 October 3rd 08 11:34 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
how to increase size of "name box" and "contents of cell " displa. Stubby- LIBERTY New Users to Excel 2 February 22nd 07 06:43 PM
Linking two "total" pages to create a "Complete Total" page Jordon Excel Worksheet Functions 0 January 10th 06 11:18 PM


All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"