Hi all,
First time poster, long time user.
Could somebody please help me with a macro that I would be far out of my depth with, and would help me save a plenty of writing long words in the future. I deal with a lot of plant samples from day to day and about 10,0000 need to be entered over the next couple of years into a spreadsheet document
What I need is a running worksheet macro that searches a list in another worksheet when i input certain species names and then automatically enters a name in the next column. The macro needs to automatically propagate the family name when the species name has been entered.
I'm thinking for this to work: when a species name (column A "Sheet1") has been entered it needs to automatically compare the first word of Column A "Sheet1" against the list in column B of "Sheet2" and if the Genus name is matches the first word in the species name then it automatically enters the family name in column B "Sheet1".
The only other step that would need to be introduced is a quality assurance step that if the first word of the species name does not match any Genus in "Sheet2" then the cell should populate with a check of the species name (e.g. Not a valid species name).
Here is a tiny example of what I need below:
"Sheet1" "Sheet2"
[TABLE="width: 600"]
<tbody>[TR]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[TD][/TD]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[/TR]
[TR]
[TD]Species name[/TD]
[TD]Auto_propagate Family name[/TD]
[TD][/TD]
[TD]Family Name[/TD]
[TD]Genus[/TD]
[/TR]
[TR]
[TD]Prunus americana[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Malus[/TD]
[/TR]
[TR]
[TD]Citrus aurantium[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Prunus[/TD]
[/TR]
[TR]
[TD]Prnus domesticus[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Rubus[/TD]
[/TR]
[TR]
[TD]Citrus grandis[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rutaceae[/TD]
[TD]Citrus[/TD]
[/TR]
</tbody>[/TABLE]
Once macro has been made:
"Sheet1" "Sheet2"
[TABLE="width: 600"]
<tbody>[TR]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[TD][/TD]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[/TR]
[TR]
[TD]Species name[/TD]
[TD]Auto_propagate Family name[/TD]
[TD][/TD]
[TD]Family Name[/TD]
[TD]Genus[/TD]
[/TR]
[TR]
[TD]Prunus americana[/TD]
[TD]Rosaceae[/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Malus[/TD]
[/TR]
[TR]
[TD]Citrus aurantium[/TD]
[TD]Rutaceae[/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Prunus[/TD]
[/TR]
[TR]
[TD]Prnus domesticus[/TD]
[TD]Not a valid species name[/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Rubus[/TD]
[/TR]
[TR]
[TD]Citrus grandis[/TD]
[TD]Rutaceae[/TD]
[TD][/TD]
[TD]Rutaceae[/TD]
[TD]Citrus[/TD]
[/TR]
</tbody>[/TABLE]
Sorry for the lack of code but I don't even know where to start with this one.
Any help is greatly appreciated.
Thanks Dallie
First time poster, long time user.
Could somebody please help me with a macro that I would be far out of my depth with, and would help me save a plenty of writing long words in the future. I deal with a lot of plant samples from day to day and about 10,0000 need to be entered over the next couple of years into a spreadsheet document
What I need is a running worksheet macro that searches a list in another worksheet when i input certain species names and then automatically enters a name in the next column. The macro needs to automatically propagate the family name when the species name has been entered.
I'm thinking for this to work: when a species name (column A "Sheet1") has been entered it needs to automatically compare the first word of Column A "Sheet1" against the list in column B of "Sheet2" and if the Genus name is matches the first word in the species name then it automatically enters the family name in column B "Sheet1".
The only other step that would need to be introduced is a quality assurance step that if the first word of the species name does not match any Genus in "Sheet2" then the cell should populate with a check of the species name (e.g. Not a valid species name).
Here is a tiny example of what I need below:
"Sheet1" "Sheet2"
[TABLE="width: 600"]
<tbody>[TR]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[TD][/TD]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[/TR]
[TR]
[TD]Species name[/TD]
[TD]Auto_propagate Family name[/TD]
[TD][/TD]
[TD]Family Name[/TD]
[TD]Genus[/TD]
[/TR]
[TR]
[TD]Prunus americana[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Malus[/TD]
[/TR]
[TR]
[TD]Citrus aurantium[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Prunus[/TD]
[/TR]
[TR]
[TD]Prnus domesticus[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Rubus[/TD]
[/TR]
[TR]
[TD]Citrus grandis[/TD]
[TD][/TD]
[TD][/TD]
[TD]Rutaceae[/TD]
[TD]Citrus[/TD]
[/TR]
</tbody>[/TABLE]
Once macro has been made:
"Sheet1" "Sheet2"
[TABLE="width: 600"]
<tbody>[TR]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[TD][/TD]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[/TR]
[TR]
[TD]Species name[/TD]
[TD]Auto_propagate Family name[/TD]
[TD][/TD]
[TD]Family Name[/TD]
[TD]Genus[/TD]
[/TR]
[TR]
[TD]Prunus americana[/TD]
[TD]Rosaceae[/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Malus[/TD]
[/TR]
[TR]
[TD]Citrus aurantium[/TD]
[TD]Rutaceae[/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Prunus[/TD]
[/TR]
[TR]
[TD]Prnus domesticus[/TD]
[TD]Not a valid species name[/TD]
[TD][/TD]
[TD]Rosaceae[/TD]
[TD]Rubus[/TD]
[/TR]
[TR]
[TD]Citrus grandis[/TD]
[TD]Rutaceae[/TD]
[TD][/TD]
[TD]Rutaceae[/TD]
[TD]Citrus[/TD]
[/TR]
</tbody>[/TABLE]
Sorry for the lack of code but I don't even know where to start with this one.
Any help is greatly appreciated.
Thanks Dallie