Results 1 to 2 of 2

Named Range - looping through each cell

Threaded View

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    6

    Named Range - looping through each cell

    Dear all, I have a named range TEST (B2:C3 and C5:D6) and I would like in VB loop though each cell in that range recording it's value whether it is a formula or value. I can dot hat with the following code but it requires cell's co-ordinates whereas in named range we have 2 sets of ranges and name is explicit.


      For Each c In Worksheets("sheet1").Range(Sheets("sheet1").Range(myarray(i, 3)), Sheets("sheet1").Range(myarray(i, 4))).Cells
            MsgBox myarray(i, 1) & "_" & k & " : " & myarray(i, 2) & " : " & c.Column & " : " & c.Row
            k = k + 1
            Next
    thanks a lot!
    Last edited by leshka_uk; 11-12-2012 at 06:21 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1