+ Reply to Thread
Results 1 to 4 of 4

search a value and copy corresponding column and paste into row alternately

  1. #1
    Registered User
    Join Date
    10-11-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    search a value and copy corresponding column and paste into row alternately

    Dear Experts

    I want search a in the column a and paste the corresponding values in the next colum b and paste in a row alternately. please find the image above and help me.

    thanks in advance.
    6.png
    Regards
    Ravi

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: search a value and copy corresponding column and paste into row alternately

    Try this

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010.
    Martin

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: search a value and copy corresponding column and paste into row alternately

    Hi, a formula approach using array INDEX

    in E2 to be confirmed with control+shift+enter before to be copied across

    =IFERROR(INDEX($B$2:$B$1000,SMALL(IF($A$2:$A$1000=$D2,ROW($A$2:$A$1000)-1),COLUMN(B$1)/(2*MOD(COLUMN(A$1),2)))),"")

    Regards
    Last edited by canapone; 10-11-2014 at 10:17 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: search a value and copy corresponding column and paste into row alternately

    Your image is not accessible. It would be better to upload an Excel workbook that demonstrates the problem.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. search column for text, copy and paste into new column
    By adammss in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2013, 07:12 PM
  2. [SOLVED] Search a column for a value if found copy entire row and paste
    By awagenhurst in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2012, 03:48 PM
  3. Search, Copy, Paste to another Column
    By ericx1 in forum Excel General
    Replies: 1
    Last Post: 09-27-2011, 04:22 PM
  4. Search, Copy and Paste selections of a column
    By Adamcadaver in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-21-2010, 04:39 AM
  5. search value, copy and paste to a column
    By Rick85 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2010, 05:40 PM

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