Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Addition function of multiple cells DB74 Excel Discussion (Misc queries) 9 May 28th 10 08:55 PM
Logical function with multiple cells Demosthenes Excel Worksheet Functions 6 May 8th 10 02:20 AM
Multiple cells for IF function Frustrated Excel Worksheet Functions 3 August 24th 09 07:40 PM
macro copy/paste data from multiple cells to multiple cells Diana Excel Discussion (Misc queries) 0 July 10th 06 09:24 PM
HOW TO EXEXUTE A FUNCTION FOR MULTIPLE CELLS anurag Excel Discussion (Misc queries) 0 May 17th 06 07:54 AM


All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"