Vlookup or other function within excel

Jimmy_No

New Member
Joined
Apr 23, 2018
Messages
4
Hi
I have a table of 16087 rows and 7 columns. and im strugling with similer names in column A and Vlookup that picks the first hit.
This is a dogbreed that have dogs with simple names and i want to pick right father/mother combinations based on age and probability to puppies.
Now i have these lookups in place
=VLOOKUP(D2;$A$2:$B$9;2;FALSE) "Father"
=VLOOKUP(F2;$A$2:$B$9;2;FALSE) "mother"
I have there names but i like to also add Reg nr
my table looks like this and are sorted on "Born" the date the puppies where born :
NameReg_NameReg_FatherFatherReg_MotherMotherBorn
Father oneIS00000/00#N/Anot known#N/Anot known12.06.1986
Mother oneIS00#N/Anot known#N/Anot known12.06.1987
Father twoIS00000/01IS00000/00Father one#N/Anot known24.06.1988
Father oneIS0001/12IS00000/00Father oneIS00mother one01.01.2012
Mother twoIS0001/13IS00000/01Father twoIS00mother one01.02.2013
puppy 1VIH 155IS00000/00Father oneIS0001/13mother two01.04.2015
puppy 2VIH 156IS00000/00Father oneIS0001/13mother two01.04.2015
puppy 3VIH 157IS00000/00Father oneIS0001/13mother two01.04.2015

<colgroup><col span="7"></colgroup><tbody>
</tbody>

what i want is to pick the right "father_one" with the age nearest to the puppies but still older than the puppies (and with a age differanse less than 14 years had been nice to have)

Is there any functions i can combine to get this to work?

hope someone has any idee so i can get past this problem

br
Jimmy
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
let me get this right, your "inputs" are Name and date of birth. You want to look this name up on "NAME" column, where the date is GREATER than the date of birth, and return the value in REG_NAME. Is that correct?

Here is what you can do
1. you need to change the date format to actual dates I think. (Just select column F, and Find and replace all periods with /)
2. use this formula: =vlookup(Name,indirect("A" & countif(F:F,"<" & birth_Date)+ 2 & ":B16087"),2,0)

The indirect is looking at column F and counting how many dates there are less than the birthday, and adding 2 rows (one for header and one to go to the next row, which is the first row that will have greater date than your selected birthday). Let me know if that helps.
 
Upvote 0
What i want is to find the "Reg_Father" and "Reg_mother" based on there name, this are values that are in the Reg_name column before the puppies are born, the problem is when at father or mother has the same name as one of there forfathers then Vlookup picks the first accurance of that name. I want it to pick the last accurance before the puppies was born not the first and not the last because it may appear later in the list aswell.
so to sum it up i want:
- mother and father reg nr
- closest to puppies born date
- but not after they have been born
- based on mother/fathers name
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top