Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default To set command for total amount

Hi,

I wish to set a "total" to the Sales column. Then bold the "total"
amount. May I know the command? Please bear in mind that the row is
not fixed for the total amount cell and it depends on the items being
sold. Thank you.


Item Sales
A 10
B 11
C 12

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default To set command for total amount

From the Data menu
Select Subtotals and follow the prompts.

This will generate a subtotal and a grand total in bold letters for you
automatically without the need of any coding

Michael Arch.

"Jentan" wrote:

Hi,

I wish to set a "total" to the Sales column. Then bold the "total"
amount. May I know the command? Please bear in mind that the row is
not fixed for the total amount cell and it depends on the items being
sold. Thank you.


Item Sales
A 10
B 11
C 12


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default To set command for total amount

Michael's right, but if you must:


Sub test()

Set iEnd = Cells(Rows.Count, 2).End(xlUp)

With iEnd.Offset(1, 0)
.Formula = "=SUM($B$2:" & iEnd.Address & ")"
.Font.Bold = True
End With

End Sub


--
Dan

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
Total amount By word art Excel Worksheet Functions 2 May 19th 09 08:47 AM
total amount sajith New Users to Excel 2 January 23rd 09 10:21 AM
Set total amount for an equation..... hln Excel Discussion (Misc queries) 5 July 24th 08 06:21 AM
sales tax total amount from one cell amount to another cell ROSIEMSM Excel Discussion (Misc queries) 1 May 19th 07 03:15 PM
How do I calculate Amount of Sales Tax from Total Amount? MikeS Excel Worksheet Functions 1 March 26th 05 07:49 PM


All times are GMT +1. The time now is 06:39 AM.

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"