+ Reply to Thread
Results 1 to 6 of 6

Pulling an entire Column "IF" a cell contains "x"

  1. #1
    Registered User
    Join Date
    01-31-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    11

    Pulling an entire Column "IF" a cell contains "x"

    Ok, so I found this macro that does what I want, the problem is I want it to search through a row, and copy the whole column. Instead of searching columns and returning rows.

    Here is the original macro

    Please Login or Register  to view this content.


    Can anyone help me edit the original macro to search through row (will be row 4) and copying the whole column into the next sheet if true?
    Last edited by jdskin2; 02-17-2012 at 02:30 PM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Pulling an entire Column "IF" a cell contains "x"

    Hi.

    Pls
    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    Please Login or Register  to view this content.
    ... and appear like this when posted:

    Code:

    your code here ...
    and here ...
    and here

    You can also type the code tags in manually if you prefer. For more information about these and other tags, click here.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    01-31-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pulling an entire Column "IF" a cell contains "x"

    example1.xlsm I have created an example file, the macro currently searches and copies the data in the format on the first tab, but all my data is like the data on the sheet4.

    Is there a simple edit to the macro to search a row and copy columns instead of searching a column and copying rows?

    Thanks,

  4. #4
    Registered User
    Join Date
    01-31-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pulling an entire Column "IF" a cell contains "x"

    anyone have some ideas?

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Pulling an entire Column "IF" a cell contains "x"

    hi jdskin2, please check attachment, run code "test", input value to filter columns for
    Attached Files Attached Files
    Last edited by watersev; 02-18-2012 at 06:42 AM. Reason: code updated

  6. #6
    Registered User
    Join Date
    01-31-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pulling an entire Column "IF" a cell contains "x"

    Thanks for the reply. Few questions, when I search for 3456 it it copies columns into a new worksheet but includes some that do not contain the value. Also, is there a way to search a string input? I tried inputing A, B, C, etc. but it did not return anything.

    Thanks Again
    Attached Files Attached Files

+ 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