+ Reply to Thread
Results 1 to 3 of 3

Get data for one field based on what is entered in another

  1. #1
    Registered User
    Join Date
    05-04-2016
    Location
    USA
    MS-Off Ver
    16
    Posts
    5

    Get data for one field based on what is entered in another

    When I enter a code into E4:???, I want F4:??? to be matched against a list that I have in J4:J35, I want the corresponding data in K4:K35 to be populated in F4:F??? as appropriate. The formula below works, however when copied, it increases every field reference by one, which loses my list:

    =IF(E4=J4,K4,IF(E4=J5,K5,IF(E4=J6,K6,IF(E4=J7,K7,IF(E4=J8,K8,IF(E4=J9,K9,IF(E4=J10,K10,IF(E4=J11,K11,IF(E4=J12,K12,IF(E4=J13,K13,IF(E4=J14,K14,IF(E4=J15,K15,IF(E4=J16,K16,IF(E4=J17,K17,IF(E4=J18,K18,IF(E4=J19,K19,IF(E4=J20,K20,IF(E4=J21,K21,IF(E4=J22,K22,IF(E4=J23,K23,IF(E4=J24,K24,IF(E4=J25,K25,IF(E4=J26,K26,IF(E4=J27,K27,IF(E4=J28,K28,IF(E4=J29,K29,IF(E4=J30,K30,IF(E4=J31,K31,IF(E4=J32,K32,IF(E4=J33,K33,IF(E4=J34,K34,IF(E4=J35,K35,"ERROR"))))))))))))))))))))))))))))))))

    I am sure there has to be an easier way to accomplish this task.

    Thank you in advance for your time and consideration.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Get data for one field based on what is entered in another

    Try

    =IFERROR(VLOOKUP(E4,$J$4:$K$23,2,0),"")

    Copy down

  3. #3
    Registered User
    Join Date
    05-04-2016
    Location
    USA
    MS-Off Ver
    16
    Posts
    5

    Re: Get data for one field based on what is entered in another

    Thank you! Works Great!

+ 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. Autoset Slicer date field Macro after data entered
    By schnizz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-05-2014, 03:15 PM
  2. Replies: 6
    Last Post: 06-02-2014, 04:47 PM
  3. Need field to remain blank unless data is entered.
    By ranchqueen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-15-2013, 11:51 PM
  4. [SOLVED] Mandatory Field or unable to save based another field having data
    By jingles9 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-18-2013, 11:18 AM
  5. Replies: 2
    Last Post: 04-10-2012, 10:38 AM
  6. Replies: 4
    Last Post: 04-05-2012, 11:41 AM
  7. How can I make a chart to Display Entered Data in a Field?
    By hammerhead13 in forum Excel General
    Replies: 1
    Last Post: 07-24-2008, 03:38 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