Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I make a format to follow the cell | Excel Discussion (Misc queries) | |||
Hide Column If Usedrange of Column ISBLANK Follow-up | Excel Discussion (Misc queries) | |||
How can I combine 2 columns of data into 1 and format it as follow | Excel Discussion (Misc queries) | |||
How do I get the color format to follow the data when referencing. | Excel Worksheet Functions | |||
Format cell in column B based on value in the next cell (column c) | Excel Discussion (Misc queries) |