Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a vb macro examining cells in some columns for all rows in a worksheet.
I want to left and right align selected cells based on testing. The code is working fine to test and move values, and I know the value "trigger" for the L and R alignment. I don't know how to "translate" the documentation help example below into the syntax I'm using to address the cells in the program. The macro will be run for worksheets that have different names, but have the same row and column "definitions." Help? Thanks. Help example: Worksheets("Sheet1").Range("A1:A5").HorizontalAlig nment = xlLeft (or right) My code's "essence": Do until cells(row, 4)='9999999' 'end marker row = row + 1 col = "whatever" If cells(row, col) "condition" then cells(row, col) = new value now, If different var test then "right align the above cell" Loop -- Neal Z |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Syntax for 'search' in Horizontal range? XL2007 | Excel Worksheet Functions | |||
In Cell alignment, how do I update the default vertical alignment | Setting up and Configuration of Excel | |||
what does "horizontal alignment = -4108" mean? | Excel Discussion (Misc queries) | |||
Format, Cells, Alignment. | Excel Discussion (Misc queries) | |||
FORMAT CELLS ALIGNMENT | Excel Discussion (Misc queries) |