SOLVED
Home

VLOOKUP or INDEX or IF formula help

%3CLINGO-SUB%20id%3D%22lingo-sub-364331%22%20slang%3D%22en-US%22%3EVLOOKUP%20or%20INDEX%20or%20IF%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364331%22%20slang%3D%22en-US%22%3E%3CP%3EI%20currently%20am%20working%20on%20a%20sheet%20to%20track%20training%20dates%20for%20managers%20within%20an%20organization.%20All%20of%20the%20training%20is%20tracked%20via%20electronic%20training%20records%20system%20that%20can%20generate%20reports%20of%20who%20has%20completed%20a%20course.%20In%20the%20past%2C%20we%20have%20run%20separate%20reports%20for%20each%20course%2C%20but%20the%20ability%20exists%20to%20run%26nbsp%3Ba%20single%20report%20for%20multiple%20training%20courses.%20With%20separate%20reports%2C%20I%20have%20a%20VLOOKUP%20built%20to%20track%20who%20has%20completed%20each%20course%2C%20but%20in%20an%20effort%20to%20save%20time%20and%20resources%2C%20I%20would%20like%20to%20grab%20the%20information%20from%20a%20single%20report%20for%20multiple%20people.%20I've%20attached%20sample%20sheets%20of%20the%20manager%20list%20as%20well%20as%20the%20report%20from%20the%20database.%20In%20theory%2C%20the%20manager's%20list%20would%20grab%20the%20completion%20date%20for%20each%20course%20from%20the%20training%20report.%20I%20can't%20figure%20out%20how%20to%20get%20the%20date%20to%20pull%20from%20one%20to%20the%20other.%20I%20can%20get%20an%20%22ISNA(VLOOKUP)%22%20type%20formula%20to%20put%20an%20%22X%22%20in%20each%20column%2C%20but%20I%20can't%20seem%20to%20get%20the%20actual%20completion%20date%20to%20populate%20for%20each%20course.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-364331%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-364469%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20or%20INDEX%20or%20IF%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364469%22%20slang%3D%22en-US%22%3E%3CP%3EHard%20to%20say%20without%20the%20file.%20Perhaps%20data%20is%20not%20matched.%20From%20the%20bit%20structured%20formula%3C%2FP%3E%0A%3CPRE%3E%3DIFNA(INDEX('%5Bdistrict%20training%20report.xlsx%5Dreport'!%24D2%3A%24D774%2C%0A%20%20%20%20%20%20%20%20%20%20%20MATCH(1%2CINDEX(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(%24A2%3D'%5Bdistrict%20training%20report.xlsx%5Dreport'!%24G2%3A%24G774)*%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(D%241%3D'%5Bdistrict%20training%20report.xlsx%5Dreport'!%24B2%3A%24B774)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%200)%2C0))%2C%0A%20%20%20%20%22%22)%3C%2FPRE%3E%0A%3CP%3Etry%20to%20check%20only%20MATCH%20part%20as%3C%2FP%3E%0A%3CPRE%3E%3DMATCH(1%2CINDEX(%0A%20%20%20%20%20%20%20(%24A2%3D'%5Bdistrict%20training%20report.xlsx%5Dreport'!%24G2%3A%24G774)*%0A%20%20%20%20%20%20%20(D%241%3D'%5Bdistrict%20training%20report.xlsx%5Dreport'!%24B2%3A%24B774)%2C%0A%20%20%200)%2C0)%3C%2FPRE%3E%0A%3CP%3Eif%20it%20returns%20some%20number%20or%20error.%20If%20error%20try%20to%20compare%20the%20cells%20directly%20like%3C%2FP%3E%0A%3CPRE%3E%3DA2%3DG15%3C%2FPRE%3E%0A%3CP%3EIn%20general%20your%20formula%20is%20correct%20if%20only%20no%20error%20in%20file%2Fsheet%20name%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-364427%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20or%20INDEX%20or%20IF%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364427%22%20slang%3D%22en-US%22%3E%3CP%3ESergei%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20so%20much%20for%20the%20help!%20When%20I%20tried%20to%20enter%20this%20into%20the%20manager%20list%20file%2C%20I%20can't%20seem%20to%20figure%20out%20why%20it%20is%20giving%20me%20an%20error%20(well%2C%20I%20think%20it's%20giving%20me%20a%20%220%22%20answer%2C%20as%20it%20shows%201%2F0%2F1900%20briefly%20before%20becoming%20a%20blank%20cell.%20I%20have%20attached%20a%20screenshot%20that%20shows%20the%20sheet%20that%20I%20am%20trying%20to%20use%20this%20on%2C%20and%20you%20can%20see%20that%20D2%20is%20blank%20with%20the%20formula%20entered.%20I%20can%20make%20it%20work%20on%20the%20sample%20sheets%20that%20I%20sent%20in%20the%20original%20post%20without%20an%20issue%2C%20but%20when%20I%20try%20to%20bring%20that%20formula%20(updating%20the%20link%20to%20the%20proper%20reference%20sheet)%20into%20the%20master%20list%2C%20it%20won't%20give%20me%20the%20date%20that%20I%20need.%20Here%20is%20the%20formula%20that%20I%20have%20in%20D2%20currently%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIFNA(INDEX('%5Bdistrict%20training%20report.xlsx%5Dreport'!%24D2%3A%24D774%2CMATCH(1%2CINDEX((%24A2%3D'%5Bdistrict%20training%20report.xlsx%5Dreport'!%24G2%3A%24G774)*(D%241%3D'%5Bdistrict%20training%20report.xlsx%5Dreport'!%24B2%3A%24B774)%2C0)%2C0))%2C%22%22)%3CBR%20%2F%3E%3CBR%20%2F%3EAnd%20attached%20is%20a%20snip%20of%20what%20it%20looks%20like%20for%20me.%20Any%20help%20figuring%20out%20why%20I%20am%20getting%20what%20I%20guess%20is%20a%20%22zero%22%20value%20is%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-364393%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20or%20INDEX%20or%20IF%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364393%22%20slang%3D%22en-US%22%3E%3CP%3EOops%2C%20only%203%20attachments%20are%20allowed.%20Here%20is%20the%20latest%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-364392%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20or%20INDEX%20or%20IF%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364392%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20general%20Power%20Query%20do%20such%20job%20quite%20good.%20If%20you%20have%20one%20file%20with%20the%20list%20of%20managers%2C%20another%20one%20is%20training%20report%2C%20you%20may%20merge%20it%2C%20pivot%20on%20training%20course%20and%20return%20resulting%20table%20into%20the%20sheet.%20As%20the%20simple%20sample%20here%20are%203%20files%20attached.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20with%20formulas%20that%20could%20be%3C%2FP%3E%0A%3CPRE%3E%3DIFNA(INDEX('%5Btraining%20report.xlsx%5DSheet1'!%24D%242%3A%24D%2437%2CMATCH(1%2CINDEX((%24A2%3D'%5Btraining%20report.xlsx%5DSheet1'!%24G%242%3A%24G%2437)*(D%241%3D'%5Btraining%20report.xlsx%5DSheet1'!%24B%242%3A%24B%2437)%2C0)%2C0))%2C%22%22)%3C%2FPRE%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CPRE%3E%3DIFNA(INDEX('C%3A%5CTest%5C%5Btraining%20report.xlsx%5DSheet1'!%24D%242%3A%24D%2437%2CMATCH(1%2CINDEX((%24A2%3D'C%3A%5CTest%5C%5Btraining%20report.xlsx%5DSheet1'!%24G%242%3A%24G%2437)*(D%241%3D'C%3A%5CTest%5C%5Btraining%20report.xlsx%5DSheet1'!%24B%242%3A%24B%2437)%2C0)%2C0))%2C%22%22)%3C%2FPRE%3E%0A%3CP%3Ewith%20closed%20training%20report%20file.%20Also%20attached%20(with%20%22raw%22%20in%20name).%3C%2FP%3E%3C%2FLINGO-BODY%3E
Chimps
New Contributor

I currently am working on a sheet to track training dates for managers within an organization. All of the training is tracked via electronic training records system that can generate reports of who has completed a course. In the past, we have run separate reports for each course, but the ability exists to run a single report for multiple training courses. With separate reports, I have a VLOOKUP built to track who has completed each course, but in an effort to save time and resources, I would like to grab the information from a single report for multiple people. I've attached sample sheets of the manager list as well as the report from the database. In theory, the manager's list would grab the completion date for each course from the training report. I can't figure out how to get the date to pull from one to the other. I can get an "ISNA(VLOOKUP)" type formula to put an "X" in each column, but I can't seem to get the actual completion date to populate for each course.

4 Replies
Solution

Hi,

 

In general Power Query do such job quite good. If you have one file with the list of managers, another one is training report, you may merge it, pivot on training course and return resulting table into the sheet. As the simple sample here are 3 files attached.

 

If with formulas that could be

=IFNA(INDEX('[training report.xlsx]Sheet1'!$D$2:$D$37,MATCH(1,INDEX(($A2='[training report.xlsx]Sheet1'!$G$2:$G$37)*(D$1='[training report.xlsx]Sheet1'!$B$2:$B$37),0),0)),"")

or

=IFNA(INDEX('C:\Test\[training report.xlsx]Sheet1'!$D$2:$D$37,MATCH(1,INDEX(($A2='C:\Test\[training report.xlsx]Sheet1'!$G$2:$G$37)*(D$1='C:\Test\[training report.xlsx]Sheet1'!$B$2:$B$37),0),0)),"")

with closed training report file. Also attached (with "raw" in name).

Oops, only 3 attachments are allowed. Here is the latest file.

Sergei,

 

Thanks so much for the help! When I tried to enter this into the manager list file, I can't seem to figure out why it is giving me an error (well, I think it's giving me a "0" answer, as it shows 1/0/1900 briefly before becoming a blank cell. I have attached a screenshot that shows the sheet that I am trying to use this on, and you can see that D2 is blank with the formula entered. I can make it work on the sample sheets that I sent in the original post without an issue, but when I try to bring that formula (updating the link to the proper reference sheet) into the master list, it won't give me the date that I need. Here is the formula that I have in D2 currently:

=IFNA(INDEX('[district training report.xlsx]report'!$D2:$D774,MATCH(1,INDEX(($A2='[district training report.xlsx]report'!$G2:$G774)*(D$1='[district training report.xlsx]report'!$B2:$B774),0),0)),"")

And attached is a snip of what it looks like for me. Any help figuring out why I am getting what I guess is a "zero" value is appreciated.

Hard to say without the file. Perhaps data is not matched. From the bit structured formula

=IFNA(INDEX('[district training report.xlsx]report'!$D2:$D774,
           MATCH(1,INDEX(
                       ($A2='[district training report.xlsx]report'!$G2:$G774)*
                       (D$1='[district training report.xlsx]report'!$B2:$B774),
            0),0)),
    "")

try to check only MATCH part as

=MATCH(1,INDEX(
       ($A2='[district training report.xlsx]report'!$G2:$G774)*
       (D$1='[district training report.xlsx]report'!$B2:$B774),
   0),0)

if it returns some number or error. If error try to compare the cells directly like

=A2=G15

In general your formula is correct if only no error in file/sheet name

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
201 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies