+ Reply to Thread
Results 1 to 4 of 4

How to Insert Data from 1 Sheet into Another Sheet Based on Given Data

  1. #1
    Registered User
    Join Date
    10-04-2019
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365 32-bit
    Posts
    2

    How to Insert Data from 1 Sheet into Another Sheet Based on Given Data

    Hello!

    I am trying to figure out how to insert data from 1 cell on one sheet to an empty cell on another sheet based on the scenario.

    For example...

    - I need to enter data on Sheet 1 from Sheet 2 based on the reference in Sheet 1
    - So, if a cell in Sheet 1 says "Blue", I need the cell next to it to say "1"
    - If a cell in Sheet 1 says "Red", I need the cell next to it to say "2"

    And so on.

    I may not need multiple sheets, so let me know if there's a more efficient way to say "If it says _____ then enter _______".

    Thank you!

  2. #2
    Forum Expert
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    1,597

    Re: How to Insert Data from 1 Sheet into Another Sheet Based on Given Data

    You can do what you are asking with a formula.

    Let's say Sheet1 cell A5 says "Blue"
    In sheet2 cell B5 put
    Please Login or Register  to view this content.
    The' Sheet1!A5' tells Excel to look on sheet 1 at cell A5 for the value. The nested 'IF' statement allows it to evealueate the value in sheet1, A5 as "Blue", "Red" or blank and put a value in sheet 2, B5 based on what is in sheet 1.
    Last edited by JLGWhiz; 10-04-2019 at 05:07 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, click the 'Go Advanced' button, Then click 'Manage Attachements' and follow the menu.
    Thinking I am smart and knowing I am smart are two entirely different levels of schizophrenia.

  3. #3
    Registered User
    Join Date
    10-04-2019
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365 32-bit
    Posts
    2

    Re: How to Insert Data from 1 Sheet into Another Sheet Based on Given Data

    Hi JLGWhiz!

    Thank you for your response.

    Unfortunately, I tried the above and it's not getting the results I want (I guarantee it is user error).

    below are screenshots - what am I missing?

    sheet 2.png

    sheet 1.png

  4. #4
    Forum Expert
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    1,597

    Re: How to Insert Data from 1 Sheet into Another Sheet Based on Given Data

    If your data begins in A1 on both sheets then the formula would go in cell B1 of sheet 2 and would look like.
    Please Login or Register  to view this content.
    Then copy it downd columns B by dragging. The formula will automatically change the row number as it is copied down.

    If you used the A5 reference but entered the formula on a different row than row 5 then it would not give accurate results. The row reference has to be the same from sheet to sheet. Also, you did not mention the Green in the OP. If you have threes options then the formulat would be
    Please Login or Register  to view this content.
    Last edited by JLGWhiz; 10-07-2019 at 09:03 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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