+ Reply to Thread
Results 1 to 4 of 4

How to copy a cell from a different sheet with conditions

  1. #1
    Registered User
    Join Date
    12-04-2015
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    11

    How to copy a cell from a different sheet with conditions

    Hi guys, so what I'm trying to do is: I have a list of data in columns, and for each cell filled I have a sheet with this cell name on it. What I need to do is: Verify if the column is filled, and if yes, copy for the next column, the cell for example "C4" from that sheet.

    Example:

    A B
    P1001 I Want to put this in the cell '='P1001'!C$4" but using VBA
    P1002 ='P1002'C$4"

    Like if I enter the cell, click equals, go to the correspondent sheet, and click cell "C4".

    What I have so far is:
    Please Login or Register  to view this content.
    I know that is completly wrong, but trying to show my line of thought.

    Thanks guys.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to copy a cell from a different sheet with conditions

    Not sure I follow what you're asking, but try this.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    12-04-2015
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    11

    Re: How to copy a cell from a different sheet with conditions

    You got it! Thank you so much.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to copy a cell from a different sheet with conditions

    You're welcome.

    Alternatively, you could put this formula in B4 and copy it down column B
    =IF(A4<>"",INDIRECT("'"&A4&"'!C4"),"")

+ 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. [SOLVED] Copy values from one sheet to another sheet using conditions
    By a1q1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2015, 07:52 AM
  2. Copy rows that meet conditions from one sheet to another sheet
    By nilamani in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-27-2014, 05:00 PM
  3. [SOLVED] Bulk import. (Copy Data from one sheet to a main sheet with conditions)
    By DanzaNZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2013, 12:24 AM
  4. copy cell value from sheet to sheet with conditions
    By soso123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2011, 05:02 PM
  5. Replies: 6
    Last Post: 09-01-2010, 03:10 PM
  6. Copy data from one sheet to another sheet with conditions
    By cchoo13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2009, 11:10 AM
  7. Copy row from one sheet to another with conditions
    By epzannini in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2009, 05:48 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