#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Cells(1)

What feature of Excel VBA am I using when I address cell "A1" as Cells(1)?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Cells(1)

What feature of Excel VBA am I using when I address cell "A1" as Cells(1)?

Its INDEX!
Cells(1) assumes the 1st cell in column 1 when no argument is specified.
Cells(1) = Cells(1,1)

In a range...
Range("A1:D8").Cells(1) refs A1
Range("A1:D8").Cells(32) refs D8
Range("A1:D8").Cells(16) refs D4
Range("A1:D8").Cells(8) refs D2

...where count is left-to-right, top-to-bottom

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Cells(1)

On Wednesday, December 12, 2018 at 5:24:26 PM UTC+11, GS wrote:
What feature of Excel VBA am I using when I address cell "A1" as Cells(1)?


Its INDEX!
Cells(1) assumes the 1st cell in column 1 when no argument is specified.
Cells(1) = Cells(1,1)

In a range...
Range("A1:D8").Cells(1) refs A1
Range("A1:D8").Cells(32) refs D8
Range("A1:D8").Cells(16) refs D4
Range("A1:D8").Cells(8) refs D2

..where count is left-to-right, top-to-bottom

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Thank you!!
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
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 06:33 AM
compare 2 column cells and return the adjacent columns cells data of the cell trebor57 Excel Worksheet Functions 1 February 1st 11 03:54 PM
Select Merged Cells and Unmerge Spread Merge Data To All Cells rtwiss via OfficeKB.com Excel Programming 2 October 2nd 08 04:24 AM
display a range of cells editible cells based on matching date Miki Excel Worksheet Functions 0 October 10th 07 03:27 PM
Skip cells with TAB/SHIFT+TAB but allow arrow keys/mouse selection of skipped cells Wescotte Excel Programming 1 June 6th 05 07:00 PM


All times are GMT +1. The time now is 04:32 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"