83
edits
Jegelewicz (talk | contribs) |
Jegelewicz (talk | contribs) |
||
Line 211: | Line 211: | ||
'''Solution:''' Avoid this issue with a pick list as data are entered. For a tutorial see [https://support.microsoft.com/en-us/office/create-a-drop-down-list-7693307a-59ef-400a-b769-c5402dce407b Create a drop-down list] | '''Solution:''' Avoid this issue with a pick list as data are entered. For a tutorial see [https://support.microsoft.com/en-us/office/create-a-drop-down-list-7693307a-59ef-400a-b769-c5402dce407b Create a drop-down list] | ||
If data is already entered, check for non-standard values with this formula Where A1 is the basisOfRecord value being tested and the list to test against is on the basis of record tab in cells A1 through A11. Any value in column A that does not match a value in the list to test against will result in #N/A. | |||
**WARNING!** Note the $ in front of the letters and numbers that comprise the list to test against. Leaving these off may result in false errors as the test will run against blank cells if the formula is copied past row 11 (or whatever the last row number is in the list to test against), so make sure those $ are in place! | |||
=VLOOKUP(A1,'basis of record'!**$**A$1:$A$11,1,FALSE) | |||
**Sample Results** | |||
A | B | |||
-- | -- | |||
MaterialEntity | MaterialEntity | |||
PreservedSpecimen | PreservedSpecimen | |||
FossilSpecimen | FossilSpecimen | |||
LivingSpecimen | LivingSpecimen | |||
MaterialSample | MaterialSample | |||
Preserved Specimen | #N/A | |||
HumanObservation | HumanObservation | |||
MachineObservation | MachineObservation | |||
fossil | #N/A | |||
tissue | #N/A | |||
MaterialCitation | MaterialCitation | |||
This same process can be used to solve issues. Get a list of unique values in your basisOfRecord column by copying the entire column to column A in a new tab, highlight the copied data and from the main Excel menu select Data->Remove duplicates. In column B add the correct basisOfRecord term that should be used for every term in column A even if the two are the same. | |||
Use a LOOKUP like the one above to get the correct basisOfRecord term for every row in your file. | |||
=VLOOKUP(A2,'unique basis of record'!$A$2:$B$12,2,FALSE) | |||
Note that the unique values to check are in column A of the unique basis of record tab and the correct replacement values are in column B of the unique basis of record tab. Also note that the value being returned is from column B indicated as the 2nd column in the array. | |||
**Sample Results** | |||
A | B | |||
-- | -- | |||
MaterialEntity | MaterialEntity | |||
PreservedSpecimen | PreservedSpecimen | |||
FossilSpecimen | FossilSpecimen | |||
LivingSpecimen | LivingSpecimen | |||
MaterialSample | MaterialSample | |||
Preserved Specimen | PreservedSpecimen | |||
HumanObservation | HumanObservation | |||
MachineObservation | MachineObservation | |||
fossil | FossilSpecimen | |||
tissue | MaterialEntity | |||
MaterialCitation | MaterialCitation |
edits