https://indocropcircles.files.wordpress.com/2017/01/tabel-kecocokan-plasma-darah.png
I want to make a call if I fill in "Type Blood" so the Blood Type will come out which is suitable for the type of blood I entered And information will come out why I got a suitable blood recommendation for that. so the results can be two. as in the table.
Type Your Blood :
The Blood Match :
Information :
but I don't know how to make a formula for that. I want to do it in Excel.
logically like this:
If I enter Type A, the Type of blood that matches is AB and O will come out; otherwise, it is not suitable no need to show
Type A = AB & O
Type B = AB & O
Type AB = B & A
Type O = A & B
You could use VLOOKUP. You specifiy a table (cell range) which contains your mapping and refer to it.
Source
Related
I have a large spreadsheet (upwards of 119K rows) of mismatched data. Column A contains a list of names in full (and occasionally a Trustee or company name), and Column B contains initialized first/middle names with full names (and occasionally Trustee or company names).
I do not currently have a way to compare them short of doing so manually as there are many variable, and am looking for some assistance.
So far I have tried using a VBA script from (How do I fuzzy match just adjacent cells?) to see if it can output the difference (which would allow me to eliminate the cells in Column 2 that had no matching data), but this did not function as intended.
I have also tried various LEFT/RIGHT to trim the names from Column A and then match this to Column B, but this has also not worked due to variance in text in Column A.
Here are some examples of the cells. Note that the names in Column A are not always in alphabetical order, but Column B is:
Example (complete match):
Column A: Column B:
Smith Marcus John J M Smith
Page Binder Book, Quoth Nevermore Raven B B Page, R N Quoth
Orange Apple Banana, Orange Pear Plum A B & P P Orange
Koala Bear, Koala Marsupial Pouch, Koala Gum Tree B, P M & T G Koala
S & P Limited S & P Limited
S & P Limited A D Cumin (S & P Limited)
Example (partial):
Column A: Column B:
Page Binder Book, Quoth Nevermore Raven B B Page
Orange Apple Banana, Orange Pear Plum A B & P P Orange (Fruit 2019 Limited)
Koala Bear, Koala Marsupial Pouch, Goanna Gumtree, Koala Gum Tree B, P M & T G Koala
Example (no match):
Column A: Column B:
Smith Marcus John H J Hyde
Sheppard Garrus Thane B B Page, R N Quoth
What I am hoping to do:
Firstly, I am hoping to correctly mark each cell in Column B as complete/partial/no match with a fill (green/yellow/red). Secondly, for partial matches (whether Column A has extra information, or Column B is missing information) I want to output in Column C the missing information, like so:
Column A: Column B:
Page Binder Book, Quoth Nevermore Raven B B Page
Orange Apple Banana, Orange Pear Plum A B & P P Orange (Fruit 2019 Limited)
Column C:
Quoth Nevermore Raven
(Fruit 2019 Limited)
Is this kind of thing even possible, or are there just too many variations in the way the data is presented in each column?
Very new to both this site and excel functions in general, this is my first task!
Thank you for your assistance/knowledge/time.
Importing and using this VBA module: https://github.com/kyledeer-32/vba_fuzzymatching
Which contains several User Defined Functions (UDFs) will get you a near optimal solution (you will still have to review matches), but you can easily fuzzy match, then calculate the similarity between strings, then a simple "=IF" function can rank them. Using this VBA module I recommended, I got the following results:
I noted that "Koala Bear..." in Column A matched to "S & P..." in Column B. I expected the value in Column B with "...Koala" to match. I checked the script and the Levenshtein Edit distance was actually equal for both. This scarce occurrence will require you to review your matches, but you can do this quickly by ranking your results based on string similarity. Here is a formula view of what I did:
To import the VBA module linked in the beginning of this answer - here is a guide: https://www.excelcampus.com/vba/copy-import-vba-code/
Note: after importing this module, you will need to enable the "Microsoft Scripting Runtime" library in the Visual Basic Editor Window it to run. Steps to do this (takes less than a minute):
From Excel Workbook:
Select Developer tab on ribbon
Select Visual Basic
Select Tools on the Toolbar
Select References
Scroll down until you see Microsoft Scripting Runtime, then check the
box
Press OK
Then your all set! You can use the UDFs (just like in my second image - above) just as you would use normal excel functions! Hope this helps!
I am trying to extract a part of a string in Excel (Excel for Mac ver.15.33) but I cannot figure out an appropriate formula structure.
Consider the following string in Excel cell A1:
Description:Guanine nucleotide-binding protein alpha-4 subunit:Gopi K. Podila:2006-05-06 Model Notes:editing needed -- 3' only editing needed at the middle portion of G protein alpha domain also:Gopi K. Podila:2006-05-06 Defline:Guanine nucleotide-binding protein alpha-4 subunit:Gopi K. Podila:2006-05-06 Literature:TITLE The genome sequence of Ustilago maydis:Gopi K. Podila:2006-02-10
I would like to extract everything between "Description:" and the first next ":" to appear.
I would also like to extract everything between "Defline:" and the first next ":" to appear.
Note that not every string i would like to perform this on will start with "Description:". The string can also start with "Defline:" or "Model Notes:" or other. The only constant is that whatever I would like to extract is placed in between "A Word:" and ":".
Thank you very much in advance!
With data in A1, in B1 enter:
=TRIM(MID(SUBSTITUTE($A1,":",REPT(" ",999)),2*999-998,999))
EDIT#1:
If "Description:" can occur anywhere in A1, then use:
=TRIM(MID(A1,FIND("Description:",A1)+LEN("Description:"),FIND(":",A1,FIND("Description:",A1)+LEN("Description:"))-(FIND("Description:",A1)+LEN("Description:"))))
How would this be written as a nested IF function:
If single
a. give <20 = "Bachelor"
b. give >20 = "Big Donor"
If married**
a. give <20 = "Frugal Double"
b. give >20 = "Charity Couple"
= IF(A2="Single",IF(C2<20,"Bachelor","Big Donor"),IF(C2<20,"Frugal Double","Charity Couple"))
where A2 could have "Single" or other value (add other validation if needed)
and C2 could have any number as a value (add other validation if necessary)
Hope that will help
I have data that look like this (going on for many more rows):
What I want to do is:
Match the relationship of C and G to the relationship of I and J.
For example, I:Q1652 matches up with J:Q1662; therefore, C:Q1652 should also match up with G:Q1662.
At the same time, A & B and E & F should maintain their relationships with C and G, respectively
For example, when C:Q1652 and G:Q1662 are being matched, they should carry with them their respective rows/values from columns A & B and E & F.
Please let me know if there's anything more I can clarify! Thanks!
Please see K1:N1 cells in the below graph.
K1: =INDEX(A:A,MATCH($I1,$C:$C,0))
L1: =INDEX(B:B,MATCH($I1,$C:$C,0))
M1: =INDEX(E:E,MATCH($J1,$G:$G,0))
N1: =INDEX(F:F,MATCH($J1,$G:$G,0))
Assume I have an input variable x and three parameters a,b,c such that:
Given b we have c = f(x,a,b) for some (known) function f
Given c we have b = g(x,a,c) for some (known, different) function g.
I want to model this in a spreadsheet (Excel for instance). More precisely, if the user provides x,a and b then c will be evaluated and if c is given then b will be evaluated. It seems like this cannot be achieved directly, since a cell can hold either a value or a formula.
Is there a canonical way to do this? If not, what would be a best-practice workaround (probably some VBA magic)?
You can separate input fields from the calculated values and add some validation that only one of the mutually exclusive field is used, e.g.:
in my example, I used following conditional formatting to highlight invalid input:
=AND($B$4<>"", $B$5<>"")
and I used following the formulas for calculated values:
=B2
=B3
=IF(AND($B$4<>"", $B$5<>""), "#ERROR: only 1 value can be specified",
IF($B$4<>"", $B$4, $B$5-1))
=IF(AND($B$4<>"", $B$5<>""), "#ERROR: only 1 value can be specified",
IF($B$5<>"", $B$5, $B$4+1))
more generally:
=if(error_condition, error_message, if(b_is_not_empty, b, g(x,a,c)))