Hi Derek,
Thanks for being so patient with my slow learning process.
When I wrote
nF = Range("Fruit")
nA = Range("Abb")
nrow = 3
Cells(nrow, nF).Value = clxFruit.Item("key" & Cells(nrow, nA).Value)
I was not trying to fill all of the named range nF. I had done some experiments that convinced me that Cells(nrow, nF) referred to a particular cell. That is, if nF refers to Col P, and nrow is 3, the reference is to Cell P3.
Scratch That! I just realized that in my experiment, the named ranges I used were single cells. I created a named range nPay that referred to a cell with a value of 9 and nHours to a cell with a value of 30. The statement Cells(13,3) = nPay * nHours worked, and that convinced me (incorrectly) that Cells(nrow, nA) would also work. Enlightenment. Better late than never.
You mentions that processing could be speeded up if arrays were used, so that all the processing was done within VBA. You said you had discussed that in an earlier post. I'd appreciate your pointing me to that post.
Thank you for showing me the 4 ways of using Cells. That will be very useful.
Regards,
Michael Trombetta
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (14) |
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar