VLOOKUP - COMPLEX FORMULA BASED ON START AND END DATES

%3CLINGO-SUB%20id%3D%22lingo-sub-1480715%22%20slang%3D%22en-US%22%3EVLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1480715%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20very%20complex!%20In%20columns%20U-X%20of%20attached%20excel%2C%20I%20want%20the%20result%20to%20show%20the%20contract%20type%20of%20the%20account%20(column%20H)%2C%20but%20it%20should%20also%20match%20the%20contract%20type%20it%20was%20THAT%20YEAR.%20I%20don't%20know%20if%20this%20is%20possible.%20Each%20Account%20in%20column%20A%20has%20several%20contracts%20-%20hence%20the%20multiple%20lines.%20I%20want%20columns%20U-X%20to%20always%20show%20the%20contract%20type%20in%20a%20given%20year%2C%20regardless%20of%20what%20the%20start%20and%20end%20date%20on%20the%20specific%20line%20is.%20I%20hope%20this%20makes%20sense!%20This%20report%20is%20driving%20me%20insane%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20put%20the%20correct%20result%20it%20should%20show%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1480715%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1480792%22%20slang%3D%22fr-FR%22%3ERe%3A%20VLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1480792%22%20slang%3D%22fr-FR%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EHave%20you%20tried%20to%20make%20another%20column%20with%20CONCATENATE%3F%20You%20could%20have%20in%20this%20new%20column%20the%20contract%20type%20-%20the%20year%20of%20the%20contract%2C%20so%20that%20you%20have%20a%20new%20unique%20information%2C%20that%20you%20could%20match%20with%20the%20same%20column%20created%20in%20your%20database%3F%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EBaptiste%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1481156%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1481156%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20friend%2C%20Can%20you%20explain%20the%20issue%20in%20more%20details%20as%20above%20nothing%20is%20clearly%20understood.%20Also%20please%20try%20connecting%20with%20me%20then%20I%20would%20explain%20or%20solve%20your%20issue%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668941%22%20target%3D%22_blank%22%3E%40JennySommet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1480873%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1480873%22%20slang%3D%22en-US%22%3EThanks%20for%20your%20reply-%20I%20am%20not%20sure%20how%20that%20would%20work.%20I%20need%20each%20column%20to%20reflect%20the%20contract%20type%20it%20was%20THAT%20year%2C%20no%20matter%20what%20the%20specific%20start%20and%20end%20dates%20on%20the%20row%20says.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1481238%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1481238%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668941%22%20target%3D%22_blank%22%3E%40JennySommet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Jenny%20(Again!)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20I%20understand%20completely%20what%20you%20want%20but%20has%20attached%20a%20workbook%20with%20some%20cells%20shaded%20in%20green%20which%20have%20a%20vlookup%20formula.%20The%20answers%20i%20get%20don't%20match%20with%20yours%20so%20maybe%20it%20is%20not%20correct%3F%20have%20a%20look%20anyway.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1481407%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1481407%22%20slang%3D%22en-US%22%3E%3CP%3EOh%20hi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F667968%22%20target%3D%22_blank%22%3E%40peteryac60%3C%2FA%3E%26nbsp%3B!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20100%25%20sure%20you%20can%20help%20me%2C%20but%20I'm%20finding%20it%20so%20difficult%20to%20explain%20what%20I%20need%20from%20the%20report%20(which%20is%20currently%20causing%20a%20lot%20of%20stress%20as%20no%20matter%20what%20I%20do%2C%20it%20does%20not%20provide%20the%20results%20I%20need%20due%20to%20the%20complexity%20of%20all%20the%20rules).%20Maybe%20I%20should%20start%20from%20scratch%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%204%20columns%3A%3C%2FP%3E%3CP%3E2017%3C%2FP%3E%3CP%3E2018%3C%2FP%3E%3CP%3E2019%3C%2FP%3E%3CP%3E2020%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20each%20column%20it%20must%20say%20either%20EC%20or%20Agent.%20The%20only%20way%20it%20can%20know%20which%20one%2C%20is%20by%20the%20start%20and%20end%20dates.%20If%20the%20start%20and%20end%20date%20ran%20across%202017%2C%20then%20I%20would%20want%202017%20to%20show%20the%20contract%20type%20that%20year.%20Only%20exception%20to%20the%20rule%2C%20is%2C%20if%20a%20contract%20was%20'Active'%20that%20year%20(you%20can%20only%20tell%20by%20going%20into%20the%20'indirect%20tab)%2C%20then%20I%20would%20want%20it%20say%20EC%20or%20Agent%20even%20if%20the%20start%20and%20end%20dates%20did%20not%20correspond.%20It%20is%20really%20very%20hard%20to%20explain%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1481629%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%20-%20COMPLEX%20FORMULA%20BASED%20ON%20START%20AND%20END%20DATES%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1481629%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668941%22%20target%3D%22_blank%22%3E%40JennySommet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJenny%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet's%20break%20it%20down.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EThe%204%20columns%20are%20to%20be%20populated%20are%20in%20SalesForce%20Contract%2022nd%20June.%20Is%20that%20right%3F%3C%2FLI%3E%3CLI%3EWe%20need%20to%20check%20the%20Indirect%20sheet%20to%20see%20if%20contract%20was%20active.%20For%20each%20Year%20column%20we%20check%20the%20corresponding%20year%20column%20on%20the%20Indirect%20sheet.%20For%20example%2C%20DOMAR%20is%20active%20for%20each%20year%202017-2020%20according%20to%20Indirect%20sheet.%20Correct%3F%3C%2FLI%3E%3CLI%3EHow%20do%20you%20know%20if%20you%20are%20to%20populate%20EC%20or%20Agent%3F%20There%20is%20nothing%20in%20the%20Domar%20record%20either%20on%20SalesForce%20sheet%20or%20Indirect%20sheet%20which%20shows%20this%3F%3C%2FLI%3E%3CLI%3EDo%20you%20need%20to%20check%20the%20Start%2FEnd%20date%20first%20or%20the%20Indirect%20sheet%20first.%20if%20the%20Indirect%20sheet%20%2C%20Domar%20is%20active%20for%204%20years%20-%20where%20do%20we%20get%20the%20EC%2FAgent%20data.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20you%20can%20list%20the%20requirements%20it%20would%20be%20easier%20to%20understand%20the%20sequence.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Epeter%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi everyone,

 

This is very complex! In columns U-X of attached excel, I want the result to show the contract type of the account (column H), but it should also match the contract type it was THAT YEAR. I don't know if this is possible. Each Account in column A has several contracts - hence the multiple lines. I want columns U-X to always show the contract type in a given year, regardless of what the start and end date on the specific line is. I hope this makes sense! This report is driving me insane

 

I have put the correct result it should show below.

 

Thank you so much!

6 Replies
Highlighted

Hi, 


Have you try to make another column with CONCATENATE ? You could have in this new column the contract type & the year of the contract, so that you have a new unique information, that you could match with the same column created in your database? 

Baptiste 

Highlighted
Thanks for your reply- I am not sure how that would work. I need each column to reflect the contract type it was THAT year, no matter what the specific start and end dates on the row says.
Highlighted

Hey friend, Can you explain the issue in more details as above nothing is clearly understood. Also please try connecting with me then I would explain or solve your issue@JennySommet 

Highlighted

@JennySommet 

Hi Jenny (Again!)

 

I am not sure I understand completely what you want but has attached a workbook with some cells shaded in green which have a vlookup formula. The answers i get don't match with yours so maybe it is not correct? have a look anyway.

 

Peter

Highlighted

Oh hi @peteryac60 !

 

I'm 100% sure you can help me, but I'm finding it so difficult to explain what I need from the report (which is currently causing a lot of stress as no matter what I do, it does not provide the results I need due to the complexity of all the rules). Maybe I should start from scratch?

 

I need 4 columns:

2017

2018

2019

2020

 

In each column it must say either EC or Agent. The only way it can know which one, is by the start and end dates. If the start and end date ran across 2017, then I would want 2017 to show the contract type that year. Only exception to the rule, is, if a contract was 'Active' that year (you can only tell by going into the 'indirect tab), then I would want it say EC or Agent even if the start and end dates did not correspond. It is really very hard to explain

Highlighted

@JennySommet 

Jenny

 

Let's break it down.

 

  1. The 4 columns are to be populated are in SalesForce Contract 22nd June. Is that right?
  2. We need to check the Indirect sheet to see if contract was active. For each Year column we check the corresponding year column on the Indirect sheet. For example, DOMAR is active for each year 2017-2020 according to Indirect sheet. Correct?
  3. How do you know if you are to populate EC or Agent? There is nothing in the Domar record either on SalesForce sheet or Indirect sheet which shows this?
  4. Do you need to check the Start/End date first or the Indirect sheet first. if the Indirect sheet , Domar is active for 4 years - where do we get the EC/Agent data.

 

if you can list the requirements it would be easier to understand the sequence.

 

thanks

 

peter