+ Reply to Thread
Results 1 to 3 of 3

selecting alternative cell in a column and Paste

  1. #1
    Forum Contributor
    Join Date
    10-11-2008
    Location
    Chennai,India
    MS-Off Ver
    2007,2003
    Posts
    123

    selecting alternative cell in a column and Paste

    Hi All,

    I am trying to write a macro, where I want to pick up alternative cells in each column from Sheet 1 and then Paste in Sheet 2. Each column starts with end of every year ( 31st Dec 1996 and so on. My data in sheet for each average column (for different years) is like this.

    Average
    Closing Price 26.47

    Stock Return -0.68


    I want the value for stock return to be pick up different columns ( for each year) then paste in sheet 2.

    Could u plz suggest me how to write a macro for this..?

    Regards,
    Upananda
    Attached Files Attached Files
    Last edited by pani_hcu; 08-27-2009 at 04:26 PM. Reason: Got the solution
    Upananda

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: selecting alternative cell in a column and Paste

    A macro, no. But put this formula in B3 and copy down and across:

    =INDEX(Sheet1!$1:$20, MATCH($A3,Sheet1!$A:$A,0)+1, MATCH(DATE(Sheet2!B$1,12,31),Sheet1!$1:$1,1))


    NOTE: Didn't we just do this same thing here:
    http://www.excelforum.com/excel-prog...and-paste.html

    It's the same basic formula.
    Last edited by JBeaucaire; 08-27-2009 at 03:54 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-11-2008
    Location
    Chennai,India
    MS-Off Ver
    2007,2003
    Posts
    123

    Re: selecting alternative cell in a column and Paste

    Hi JB,

    Thanks again for ur answer.

    Regards,
    Upananda

+ Reply to Thread

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