+ Reply to Thread
Results 1 to 7 of 7

lookup particular value in different worksheets and take range to one sheet

  1. #1
    Registered User
    Join Date
    02-25-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    lookup particular value in different worksheets and take range to one sheet

    hi,
    I have 8 to 15 sheets in a workbook .I want to check the first column(A) of each sheet and check if it is july2006.
    from whatever cell the value is true I have to copy the range from column B to a new sheet.It should be repeated for number of sheets in the workbook.
    so suppose I have the data like this
    may 2006 .25
    june 2006 .24
    july 2006 .26
    aug 2006 .27
    sept 2006 .27
    oct 2006 .28

    so I will have to copy the data .26,.27,.27,.28 to a new worksheet.I am attaching the sheet too.
    Thankyou for your help in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: lookup particular value in different worksheets and take range to one sheet

    Do you mean entries > july 2006 as you have stated in the example Or is it entries = july 2006?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    02-25-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: lookup particular value in different worksheets and take range to one sheet

    yeah it is entries > july2006

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: lookup particular value in different worksheets and take range to one sheet

    Should the sheet name be mentioned in the output, from where the data has been copied?

  5. #5
    Registered User
    Join Date
    02-25-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: lookup particular value in different worksheets and take range to one sheet

    I am new to vba so
    I tried working the code like this
    columnscopy
    Please Login or Register  to view this content.
    Its working fine except in the end it is giving me one extra column (i.e. copying 1st column from sheet1 again instead of exiting out of loop)
    It should come like this
    column1 column2 col3 col4 col5 col6 col7 col8
    Fixed Income Core TIPS equity International Equity Large cap Small Cap Absolute Returns REIT
    instead it is coming like this (where col 9 and col 1 are same)
    column1 column2 col3 col4 col5 col6 col7 col8 col9
    Fixed Income Core TIPS equity International Equity Large cap Small Cap Absolute Returns REIT Fixed Income Core

    I am not able to find what is the problem .I added watch also but not able to figure out what problem is
    Last edited by arlu1201; 05-22-2012 at 02:46 PM.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: lookup particular value in different worksheets and take range to one sheet

    You should put all code within code tags. I will review your code, what about my questions in post 4?

  7. #7
    Registered User
    Join Date
    02-25-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: lookup particular value in different worksheets and take range to one sheet

    Hey Arlette

    Thank you for your reply .
    For post 4 I replied before but doesn't seem to see the answer here .I am new to this forum so don't know where did I replied it .
    Anyways I do need the name of the sheets at top of columns .
    For post 5 I figured it out that I was using consolidate as sheet name instead of Consolidate(Uppercase C).So it works fine now .
    However I am not able to find how to copy from a particular column .

+ 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