Add Range As Value In Cell

  • Basically i have a worksheet called "Bookings".
    In that worksheet the cell A3 contains a cell value, which i change often, such as B3, B4, G5, F6, etc


    I want a macro that will use the value i typed in A3 as the range
    so something like

    Code
    Worksheets("Bookings").Range("A3.Value").


    If you get what i mean. I don't know how to tackle it, i need a way to refer to a range as a value in a cell.

  • Re: Add Range As Value In Cell


    Well, I think youre nearly right, is this what you need -


    Code
    Worksheets("Bookings").Range("A3").Value


    You can also drop the "Value" at the end as this is default for Range("A3")...


    [edit]
    so this would also work...


    Code
    msgbox Worksheets("Bookings").Range("A3")


    HTH
    Ger


    Welcome to the board by the way, and congratulations on passing the first test of putting your code into code tags.... : D

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Add Range As Value In Cell


    Or if you want to get the value of the cell that is referened in A3, then

    Code
    Worksheets("Bookings").Range(Range("A3")).Value


    That is, if cell A3 contained "B5" (no quotes) then the above would retrun the value in cell B5.


    And (EDIT) I missed it. Welcome to OzGrid

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!