IF function for Pivot Table

%3CLINGO-SUB%20id%3D%22lingo-sub-2318572%22%20slang%3D%22en-US%22%3EIF%20function%20for%20Pivot%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2318572%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20run%20a%20semi-complex%20code%20in%20excel%20and%20am%20having%20difficulty.%20I%20created%20a%20pivot%20table%20with%20people's%20information%20(picture%201)%20and%20want%20to%20run%20a%20function%20that%20will%20scan%20through%20the%20pivot%20table%2C%20see%20if%20%22Adam%20Doe%22%20exists%2C%20if%20so%2C%20see%20if%20a%20city%20exists%2C%20if%20so%2C%20print%20the%20value%2C%20otherwise%20print%20%22NA%22%20in%20the%20new%20table%20(picture%202)%20The%20same%20formula%20would%20continue%20except%20instead%20of%20city%2C%20look%20for%20state%2C%20phone%20number%2C%20email%2C%20etc.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20appreciated!%20Thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202021-05-03%20at%202.53.45%20PM.png%22%20style%3D%22width%3A%20312px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277528iC441D447233EB6A2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202021-05-03%20at%202.53.45%20PM.png%22%20alt%3D%22Pivot%20Table%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EPivot%20Table%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202021-05-03%20at%202.51.57%20PM.png%22%20style%3D%22width%3A%20664px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F277529iFBD78E508861823F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202021-05-03%20at%202.51.57%20PM.png%22%20alt%3D%22New%20List%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ENew%20List%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2318572%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2319655%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%20for%20Pivot%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2319655%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1043963%22%20target%3D%22_blank%22%3E%40MasonF2265%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20Applicant%20Name%20is%20separate%20list%20I'd%20add%20it%20to%20data%20model%20in%20addition%20to%20main%20source%2C%20build%20relationship%20and%20returns%20result%20as%20another%20tabular%20PivotTable%20or%20like.%3C%2FP%3E%0A%3CP%3EAnother%20variant%20us%20to%20use%20cube%20functions%2C%20first%20what%20google%20returned%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmacrordinary.ca%2F2020%2F08%2F19%2Fcube-formulas-the-best-excel-formulas-youre-not-using%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ECube%20Formulas%20-%20The%20Best%20Excel%20Formulas%20You're%20Not%20Using%20-%20Macrordinary%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi everyone, 

 

I am trying to run a semi-complex code in excel and am having difficulty. I created a pivot table with people's information (picture 1) and want to run a function that will scan through the pivot table, see if "Adam Doe" exists, if so, see if a city exists, if so, print the value, otherwise print "NA" in the new table (picture 2) The same formula would continue except instead of city, look for state, phone number, email, etc.  

 

Any help would be appreciated! Thank you!

 

Pivot TablePivot TableNew ListNew List

1 Reply

@MasonF2265 

If Applicant Name is separate list I'd add it to data model in addition to main source, build relationship and returns result as another tabular PivotTable or like.

Another variant us to use cube functions, first what google returned Cube Formulas - The Best Excel Formulas You're Not Using - Macrordinary