Re: nagivating rows and columns

From: Bob Phillips (bob.phillips_at_notheretiscali.co.uk)
Date: 10/11/04


Date: Mon, 11 Oct 2004 21:48:29 +0100


    Set oCells = Range("A9").Resize(iRows,1)
    For Each oCell In oCells
        oCell.Value = "<value>"
    Next oCell

-- 
HTH
RP
"greg" <greg@nospam.com> wrote in message
news:uJ3SnJ9rEHA.2580@TK2MSFTNGP15.phx.gbl...
> hello,
> i am trying to fill in some data.
> i will know that there are always 6 columns.
> and i have a variable that has the rows in it.  iRows.
> i am trying to find a good way to nagivate through the cells.
> i see there is a range.next.  which i can move to the right with.
> is there a down method?
> so i have:
>     Set oCell = Range("A9")    'start cell
>     oCell.Value = "<value>"
>     Set oCell = oCell.Next
>
>
> thanks in advance
>
>


Relevant Pages

  • Re: Deleting all empty rows in a table using a macro
    ... only to look in the second column of the table? ... The construct " For Each oCell In oRow.Rows.Cells" expands to "For each ... the cells in the first column of the table, i need it to look at the second ... NumRows As Long, TextInRow As Boolean ...
    (microsoft.public.mac.office.word)
  • Re: Q: How to color a cell based on values in two cells
    ... When more than 1 cells are changed simultaneusly, ... Private Sub Worksheet_Change ... For Each oCell In Intersect ... oCell.Interior.ColorIndex = xlNone ...
    (microsoft.public.excel.programming)
  • Re: Q: How to color a cell based on values in two cells
    ... Private Sub Worksheet_Change ... For Each oCell In Intersect(_ ... Subject: Q: How to color a cell based on values in two cells ... to apply this to microarray data (multiple columns); ...
    (microsoft.public.excel.programming)
  • Re: VBA to find third decimal point?
    ... Sub foo() ... Dim oCell As Cell ... >> like to go through each of these cells and truncate the number just before ...
    (microsoft.public.word.vba.general)
  • Re: Turn off automatic row addition?
    ... Try this macro (posted by Jay Freedman two years ago in the "TAB key appends ... Dim oCell As Cell ... Set oCell = ActiveDocument.Tables.Cell ...
    (microsoft.public.word.tables)