Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro for Formatting

Hello all,
I am creating a spreadsheet where I have subtotals. However, I want to add
subtotal underscore lines to establish an "accounting" formatting. Does
anyone know how to create a MACRO or VBA code to accomplish this?

Thanks for your time.
--
~We Get What We Focus On

  #2   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Macro for Formatting

Hi Cute,

One way:

Go to [Tools] then [Macro] then [Record New Macro].

Underline your cells. Then turn off the recorder.

For more help on this go to help and enter "Record a Macro"

Hope this helps you.

"Cute Techie" wrote:

Hello all,
I am creating a spreadsheet where I have subtotals. However, I want to add
subtotal underscore lines to establish an "accounting" formatting. Does
anyone know how to create a MACRO or VBA code to accomplish this?

Thanks for your time.
--
~We Get What We Focus On

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Macro for Formatting

Hi Cute,

I have one that does just that, it is

'Change cell format in Range back to accounting
Range("B" & i).NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($*
""-""??_);_(@_)"

Just replace this ("B" & i) with your range.

Also, for things such as this, if you turn on the macro recorder and format
manually, the recorder will recoord the code that you need; then you can copy
and paaste it to your module/macro.
Who would ever remember this mess :)

Hope it helps!

ML

"XP" wrote:

Hi Cute,

One way:

Go to [Tools] then [Macro] then [Record New Macro].

Underline your cells. Then turn off the recorder.

For more help on this go to help and enter "Record a Macro"

Hope this helps you.

"Cute Techie" wrote:

Hello all,
I am creating a spreadsheet where I have subtotals. However, I want to add
subtotal underscore lines to establish an "accounting" formatting. Does
anyone know how to create a MACRO or VBA code to accomplish this?

Thanks for your time.
--
~We Get What We Focus On

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Macro for Formatting

Ahh,\I pologize, XP did mention the recorder and yes, that is the annswer for
futre formatiing needs, however, I did give you the code for accounting format

ML

"XP" wrote:

Hi Cute,

One way:

Go to [Tools] then [Macro] then [Record New Macro].

Underline your cells. Then turn off the recorder.

For more help on this go to help and enter "Record a Macro"

Hope this helps you.

"Cute Techie" wrote:

Hello all,
I am creating a spreadsheet where I have subtotals. However, I want to add
subtotal underscore lines to establish an "accounting" formatting. Does
anyone know how to create a MACRO or VBA code to accomplish this?

Thanks for your time.
--
~We Get What We Focus On

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro for Formatting

Thank you and I'll try it on Monday :) Will this do this for non-contigous
rows?
--
~We Get What We Focus On



"ML0940" wrote:

Hi Cute,

I have one that does just that, it is

'Change cell format in Range back to accounting
Range("B" & i).NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($*
""-""??_);_(@_)"

Just replace this ("B" & i) with your range.

Also, for things such as this, if you turn on the macro recorder and format
manually, the recorder will recoord the code that you need; then you can copy
and paaste it to your module/macro.
Who would ever remember this mess :)

Hope it helps!

ML

"XP" wrote:

Hi Cute,

One way:

Go to [Tools] then [Macro] then [Record New Macro].

Underline your cells. Then turn off the recorder.

For more help on this go to help and enter "Record a Macro"

Hope this helps you.

"Cute Techie" wrote:

Hello all,
I am creating a spreadsheet where I have subtotals. However, I want to add
subtotal underscore lines to establish an "accounting" formatting. Does
anyone know how to create a MACRO or VBA code to accomplish this?

Thanks for your time.
--
~We Get What We Focus On

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
Macro formatting last row Erin Excel Worksheet Functions 3 February 1st 10 03:41 PM
formatting macro help [email protected] Excel Discussion (Misc queries) 2 March 10th 09 12:53 PM
formatting a macro Maggie Excel Programming 2 February 28th 07 09:07 PM
Macro Formatting? Please Help Plasmaticfire[_2_] Excel Programming 1 August 11th 06 08:00 PM
formatting macro Greg Brow Excel Programming 1 February 16th 05 10:36 AM


All times are GMT +1. The time now is 08:06 PM.

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

About Us

"It's about Microsoft Excel"