Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a named range defined in 1 worksheet of my workbook. I want to step
through this range (e.g. 10 rows by 8 columns = 80 cells) one cell at a time and based on a select case apply formatting to the same cell in another worksheet in the same workbook. Can someone show me the construct to do this? I'm no VBA expert as you can tell. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim cell As Range
For Each cell in Range("myRange") Select Case cell.Value Case 1: 'do something 'etc. End Select Next cell -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Kent McPherson" wrote in message ... I have a named range defined in 1 worksheet of my workbook. I want to step through this range (e.g. 10 rows by 8 columns = 80 cells) one cell at a time and based on a select case apply formatting to the same cell in another worksheet in the same workbook. Can someone show me the construct to do this? I'm no VBA expert as you can tell. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim currRow as long
dim currCol as integer for currRow=myRange.Row to myRange.Row+myRange.Rows.Count for currCol=myRange.Columnto myRange.Column+myRange.Columnes.Count select case cells(currRow,currCol) Case 1: sheets("OtherSheetName").cells(currRow,currCol).nu mberformat="%0.00" end select next next Peter Richardson "Kent McPherson" wrote: I have a named range defined in 1 worksheet of my workbook. I want to step through this range (e.g. 10 rows by 8 columns = 80 cells) one cell at a time and based on a select case apply formatting to the same cell in another worksheet in the same workbook. Can someone show me the construct to do this? I'm no VBA expert as you can tell. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a Drop Down List with Step by Step Instructions for 2007 | Excel Worksheet Functions | |||
Need step by step to add invoice numbering to excel template | New Users to Excel | |||
What is the step-by-step procedure for making a data list? | Excel Discussion (Misc queries) | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions | |||
How to step through top row of a Range object | Excel Programming |