Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
input of single value into multiple cells simultaneously
Hi,
I'm trying to enter a bunch of asterisks into a range of cells (columns A through I) in a row "i" in a worksheet that has been defined as SHD. The macro has already "read" the value of i correctly. However, when I use the following code, it gives me an error code. Could you tell me what is wrong with this ? SHD.Range(Cells(i, 1), Cells(i, 9)) = "********" Appreciate any help. Thanks, Joe. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
input of single value into multiple cells simultaneously
SHD.Range(SHD.Cells(i, 1), SHD.Cells(i, 9)) = "********"
or With SHD .Range(.Cells(i,1),.Cells(i,9)) = "********" End With or SHD.Cells(i,1).Resize(1,9) = "********" -- Regards, Tom Ogilvy "Joe" wrote in message oups.com... Hi, I'm trying to enter a bunch of asterisks into a range of cells (columns A through I) in a row "i" in a worksheet that has been defined as SHD. The macro has already "read" the value of i correctly. However, when I use the following code, it gives me an error code. Could you tell me what is wrong with this ? SHD.Range(Cells(i, 1), Cells(i, 9)) = "********" Appreciate any help. Thanks, Joe. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
input of single value into multiple cells simultaneously
Thanks a lot, Tom. Incidentally, I saw this other option - formulaR1C1,
and used it. I have one more question though - why is it that I have to define SHD specifically into each of the cells address in: SHD.Range(SHD.Cells(i, 1), SHD.Cells(i, 9)) = "********" Thanks, Joe. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
input of single value into multiple cells simultaneously
If you don't they refer to the Activesheet. Or if you are using them in a
sheet module, the unqualified range reference it interpreted to refer to the sheet containing the code. Since you are not assigning a formula, then Value would be more appropriate. However, the end result will be the same. There is also Formula. Just for illustration With Range("A1") .Formula = .FormulaR1C1 = .Value = .FormulaLocal = .FormulaR1C1Local = End With Don't just grab something out of the hat - look at the help and see which is appropriate. Sometimes it makes no difference, other times it does. -- Regards, Tom Ogilvy "Joe" wrote in message oups.com... Thanks a lot, Tom. Incidentally, I saw this other option - formulaR1C1, and used it. I have one more question though - why is it that I have to define SHD specifically into each of the cells address in: SHD.Range(SHD.Cells(i, 1), SHD.Cells(i, 9)) = "********" Thanks, Joe. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to clear multiple cells of input data in Excel simultaneously | Excel Worksheet Functions | |||
In Excel how do I update cells in multiple sheets simultaneously? | Excel Discussion (Misc queries) | |||
How do I use multiple worksheets as input for a single pivot tab | Excel Worksheet Functions | |||
Simultaneously change values in multiple cells? | Excel Worksheet Functions | |||
Pasting single cells from Word to multiple cells in Excel | Excel Worksheet Functions |