none
Loop through cells given the reference RRS feed

  • Question

  •  

    Hello,

    i am writing a custom function in vba, and need to loop through the reference passed, and get all the values of the individual cells like this

    J28:S28

    Here is a pseudo code of what am trying to do

    sub dosomthing(cellrange as string)
    for each cell in cellrange
    'do some work here
    next 
    end sub
    
    

    thanks


    Oghenez http://www.avo-soft.com
    • Moved by kleinma Wednesday, June 22, 2011 5:22 PM VBA question (From:Visual Basic General)
    Wednesday, June 22, 2011 5:14 PM

Answers

  • Ok i found the solution somewhere else

     

    Sub Test()
    For each mycell in Range("A1:U644")
       if mycell.value <> "" then mycell.value = 1
    Next mycell
    End sub

    thanks

     
    Oghenez http://www.avo-soft.com
    • Marked as answer by Oghenez Wednesday, June 22, 2011 6:40 PM
    Wednesday, June 22, 2011 6:18 PM