+ Reply to Thread
Results 1 to 2 of 2

Multiple cells in cells function

  1. #1
    Adam
    Guest

    Multiple cells in cells function

    I want to center a few cells, but my sytax is not correct with the cells
    function. Here is what I have. Thanks for the help

    cells(3,columnnum:columnnum+2).HorizontalAlignment = xlCenterAcrossSelection

    I cannot use the range funtion since my row value is a variable.

  2. #2
    DaveO
    Guest

    RE: Multiple cells in cells function

    You can use the Range function try this...

    Range(cells(3, columnnum), cells(3, columnnum +2)).HorizontalAlignment =
    xlCenterAcrossSelection

    HTH.

    "Adam" wrote:

    > I want to center a few cells, but my sytax is not correct with the cells
    > function. Here is what I have. Thanks for the help
    >
    > cells(3,columnnum:columnnum+2).HorizontalAlignment = xlCenterAcrossSelection
    >
    > I cannot use the range funtion since my row value is a variable.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1