Consulting

Results 1 to 4 of 4

Thread: Range using Offset

  1. #1
    VBAX Regular
    Joined
    Sep 2008
    Posts
    9
    Location

    Range using Offset

    is it possible to specify a range using offset's? as each month the columns required will change, hence i require a less explicit way (than A29:A34, for example) to tell it where to copy and paste from and to.

    does that make sense?

    Thanks

  2. #2
    VBAX Mentor MaximS's Avatar
    Joined
    Sep 2008
    Location
    Stoke-On-Trent
    Posts
    360
    Location
    of course you can:

    [VBA]
    =OFFSET(A1,1,MONTH(NOW()))
    [/VBA]

    Above will give you value of cell A1 plus one row and nine columns ("J2").

    Adjust as you like.

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,455
    Location
    =A29:INDEX(A29:A41,MONTH(TODAY()))

    non-volatile
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Regular
    Joined
    Sep 2008
    Posts
    9
    Location
    Thanks very much

Posting Permissions

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