Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jeff
 
Posts: n/a
Default VBA using "Cells(i,j)

Hi,

I was using the code

a = Cells(73,3).address

so this set
a = "C73"

How would I use something similiar to set a equal to an array

a = "C73:AA73"

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dnereb
 
Posts: n/a
Default VBA using "Cells(i,j)


You want to use Ranges:

Dim L as Long, M as Long, N as Long O as Long
Dim Rng as Range

L = 3
M = 3
N = 100
O = 100

set Rng = activesheet.Range(cells(L,M),cells(N,O))

now Rng contains a range of cells on your sheet.


--
Dnereb


------------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...o&userid=26182
View this thread: http://www.excelforum.com/showthread...hreadid=508743

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



All times are GMT +1. The time now is 06:52 PM.

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

About Us

"It's about Microsoft Excel"