#1   Report Post  
Old December 12th 18, 01:38 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 18
Default Cells(1)

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

  #2   Report Post  
Old December 12th 18, 06:24 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,001
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("A18").Cells(1) refs A1
Range("A18").Cells(32) refs D8
Range("A18").Cells(16) refs D4
Range("A18").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  
Old December 12th 18, 10:26 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
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("A18").Cells(1) refs A1
Range("A18").Cells(32) refs D8
Range("A18").Cells(16) refs D4
Range("A18").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 05:33 AM
compare 2 column cells and return the adjacent columns cells data of the cell trebor57 Excel Worksheet Functions 1 February 1st 11 02: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 11:43 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017