+ 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
    3

    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 JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    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, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

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

    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 JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    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)

Similar Threads

  1. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  2. Need a code to generate data on sheet 1 based on data from sheet 2, multiple critereia
    By TrinhTran02 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2015, 03:10 PM
  3. [SOLVED] Need data from sheet A to appear in sheet B based on data posted in a column in sheet A?
    By Firebird77 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-02-2014, 06:27 AM
  4. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  5. Replies: 1
    Last Post: 11-20-2012, 10:01 PM
  6. Copy Sheet / Create & Name New Sheet / Insert Before a Sheet / Paste Data
    By thinkspac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2012, 02:27 PM
  7. As user fills out data sheet, then fill out a results sheet based on data sheet entry
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-13-2012, 03:57 PM

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