Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do i get a column format to follow me from one cell to another

As I go through my spreadsheet I am calculating "max" and "min" values. When
I decide a column to work in I want to calculate the value and then format
the column to a 4-point decimal value "0.0000". I don't know in advance
which column I need to work in, but when I find one I want to perform those
two operations. I'm trying to set up a macro that is will be achored to the
current column I am working in. How can I do that?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default how do i get a column format to follow me from one cell to another

Give this code a try...

Sub Test()
With ActiveCell.EntireColumn
Min = WorksheetFunction.Min(.Cells)
Max = WorksheetFunction.Max(.Cells)
.NumberFormat = "0.0000"
End With

' You didn't say what you wanted to do
' with Min, Max, so I just show them
MsgBox Min & " // " & Max
End Sub

Just activate any cell in the column and then run the code.

--
Rick (MVP - Excel)


"Graphically Challenged"
wrote in message ...
As I go through my spreadsheet I am calculating "max" and "min" values.
When
I decide a column to work in I want to calculate the value and then format
the column to a 4-point decimal value "0.0000". I don't know in advance
which column I need to work in, but when I find one I want to perform
those
two operations. I'm trying to set up a macro that is will be achored to
the
current column I am working in. How can I do that?

Thanks!


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
How can I make a format to follow the cell Darren Excel Discussion (Misc queries) 3 August 18th 09 02:06 PM
Hide Column If Usedrange of Column ISBLANK Follow-up [email protected] Excel Discussion (Misc queries) 1 April 12th 09 10:00 PM
How can I combine 2 columns of data into 1 and format it as follow Jonathan Excel Discussion (Misc queries) 1 February 27th 08 05:32 PM
How do I get the color format to follow the data when referencing. Color formatting while referencing Excel Worksheet Functions 0 August 17th 05 08:40 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM


All times are GMT +1. The time now is 08:33 AM.

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"