Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks so much to all -- JE, Bernard and David and anyone
else that follows. JE and David (or anyone else), can you comment on VBA Rnd v. Excel RAND(). Are they the same algorithm? if not, is one known to be better than the other? Bernard, your instructions were impeccable. I can correct the off-by-one error (rowOffset:=10 yields 11 cells, not 10). How can I make 10 a "variable" -- an input or parameter to the macro or a reference to a cell value? I can live with editing the macro for now; or I can use David's idea with "for each ... in selection". But I thought this should be a simple embellish to Bernard's macro (famous last words!). Borrowing FE's formula syntax (thanks very much) and taking a wild guess (I know: RTFM!), the following did not work. But it demonstrates what I want to do -- and of course, I am open to any better ideas. Dim mysz as long mysz = "=IF($A$1 0, $A$1, 10)" Range(ActiveCell, ActiveCell.Offset(rowOffset:=mysz, columnOffset:=0)).Select I tried various incarnations with ".Formula" and ".Value", even a hypothetical Value(...) function, to no avail. Obviously I need to get that book or study one of the tutorial web sites. In any case, your responses have been a great motivator, and it gave me a head start. Thanks again. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto populate cells based on 2 cells division. | Excel Discussion (Misc queries) | |||
REVISED ?? - populate limited cells w/ set value | Excel Worksheet Functions | |||
How do I select cells and make the info populate into a form? | Excel Worksheet Functions | |||
Convert data type of cells to Text,Number,Date and Time | Excel Worksheet Functions | |||
how can i select all the cells with same color on a sheet if there are multipale colors by vba code | Charts and Charting in Excel |