Algorithm to match IBAN to BIC - iban

I'm trying to find a solution to convert IBANs to BICs.
In theory, all I need is to have a db with national bank codes and their BICs to compare these national codes with corresponding ones in IBANs (based on IBAN format for that country described in https://www.swift.com/sites/default/files/resources/swift_standards_ibanregistry.pdf). But the problem is, that I can only find limited and not accurate sources of national bank codes (or can't find at all, even for big ones).
Is there a way to find a BIC number for a given IBAN in another way? I also thought about first 4 letters in a BIC code, which represents financial institution - but I did not find if it's possible to convert them to "national" codes or vise versa).

Related

Excel 2007, inconsistent logical OR response

Regarding Excel 2007 (though it may pertain to other versions):
I want to apply Excel Data Validation to manually inputted data. In this particular case, the input is of the form NN.nnnnh, where the digit "h" is a "half-digit". That is, it can either be 0 or 5.
The spread-sheet converts land-surveying that is manually entered in the form of Feet, Inches, and 16ths of an inch, into decimal feet
The function of the half-digit is to allow the optional higher-precision to 1/32nd of an inch.
For example:
43.0913 is the raw entry for 43 feet, nine inches, and 13/16ths of an inch.
Now, by adding the half-digit in the fifth decimal place, a precision of 1/32" can be expressed.
For example:
27.08135 is the manual entry for 27 feet, 08 inches, and (13.5/16=) 27/32nds of an inch.
The raw input NN.nnnnh is decomposed and converted into feet as a decimal number, using Excel TRUNC function. This manner of conversion is analogous to the more familiar conversion of angles entered as D˚M'S", into DD.dddddd).
I want to assure that the 5th decimal place, manually entered, is ONLY Zero or 5.
I can separately apply logical tests to determine if the fifth-decimal entry is Zero, or 5.
But, when I combine those separate logical tests using the =IF(OR( structure, I get inconsistent results IFF the manually-entered data has an integer value (i.e., in the NN.nnnnh format, any length of just one foot or greater, manually entered as >= 1.00000). Unless I undertake the surveying of table-top architectural scale models, this has serious limitations !!!
I have attached an example spreadsheet to illustrate the formulae used and the results. If anybody can shed some light on this, it would be appreciated.
(If there is a way to simply Attach a *.xlsx example....please let me know. I had intended to do this, and then discovered that it seems to be impossible!)
Use MROUND to test if the number is the same:
=A1=MROUND(A1,0.00005)

"IF" function for analysis of hospital lab frequency

I work for a hospital that is part of a larger network. We were recently asked by our corporate overlords to address the use of a specific laboratory test. in general, this test should only be performed daily, which should be considered to corresponded to a 24 hour period from last draw. sometimes, however, based on when people arrive to the hospital (e.g. 7pm), and in the interest of bundling labs for a single draw, they may be drawn sooner to coincide with routine testing i.e. 5am. it would never be necessary to otherwise need to repeat within a short (8 hour) window, particularly on the same day.
we have been asked to validate to see if we are adhering to this general practice, as testing any more frequent than that, say, within 12h of a previous test, has no real clinical value and thus adds unnecessary cost.
To address this issue I was given a dataset that among other items includes all instances the lab was performed including collection date and time.
please see HIPPA-safe example below (to be clear, no real data and identifiers are not real); the actual dataset has over 4,174 entries corresponding to 1,328 unique persons. everyone had at least one test performed, not everyone had >1.
I THINK what I want to do is an IF formula that reads the antecedent cell to 1) check if same person and 2) if so, perform a subtraction of the time stamp to display the relevant difference in time, which I can then filter, create histogram, etc. does this seem like a reasonable approach? is there a more preferable method to facilitate analysis? do any other forms of analysis come to mind?
=IF(B2=B1, D2-D1, "n/a")
example data set with formula:
any other forms of analysis come to mind?
By the looks of it you should consider taking the values under "Results" into account, assuming there is a band that might be considered 'normal' readings. The "one in 24 hours is sufficient" rule of thumb may well be appropriate for a series of values within the 'normal' band but not so much so if readings are close to 'danger level'.
That is, in some cases a higher than 'standard' frequency of monitoring may be in the patient's interest, even if not hospital policy, so it may be worth separating the "less than 24 hours interval" readings into those where the higher frequency provided information of little value (eg readings remaining within a 'normal' band) from any that crossed into or out of the band and/or large changes in value. This though may be more a matter of statistical analysis than programming and depend upon whether any action might be taken as a result of such "extra" readings.

How to format fantasy currency in Microsoft Excel?

In the Format Cells dialog of Excel, where you can create custom numbers, how do I format modern American currency to look like fantasy currency? Instead of dollars, dimes, and pennies, I need it to show gold pieces, silver pieces, and copper pieces (gp, sp, cp, respectively), while also excluding any that results in 0.
Some examples of the desired output:
$25.85 = 25gp 8sp 5cp
$75.50 - 75gp 5sp
$1,000.00 = 1,000gp
Does that make any sense?
This seems to do what you want according to your sample data.
=TRIM(TEXT(INT(A2),"0 \g\p ")&IF(--RIGHT(TEXT(A2, "0.0")),TEXT(--RIGHT(TEXT(A2, "0.0")),"0 \s\p "),TEXT(,))&IF(--RIGHT(TEXT(A2, "0.00")),TEXT(--RIGHT(TEXT(A2, "0.00")),"0 \c\p "),TEXT(,)))
Actually, that formula can be improved to,
=TRIM(TEXT(INT(A2),"0 \g\p ;;;")&TEXT(--RIGHT(TEXT(A2,"0.0")),"0 \s\p ;;;")&TEXT(--RIGHT(TEXT(A2,"0.00")),"0 \c\p ;;;"))

What is the valid range for IMSI numbers

I want to validate International mobile subscriber identity (IMSI) numbers. What is the valid range of IMSI numbers? Please let me know about specification or any web link.
I'm not sure this question has an answer, as this number is both highly dependent on each country's independent numbering plan .
The first 5 digits of the IMSI consists of an MCC (Mobile Country Code) + MNC (Mobile Network Code) combination of which, according to this site, there are 1663 entries as of 3/24/2016. These combinations are not sequential and were designed to accommodate natural population growth. So the sequences skip around somewhat arbitrarily mainly because they mostly are.
The remaining 10 digits are the MSIN (Mobile Subscriber Identification Number), which is basically a phone number. This number is regulated by each country's numbering plan, which vary considerably from country to country.
So, there's really no cohesive rule you can use to verify IMEI integrity, other than some sort of database lookup.
Wish you luck in your search and your project!

Excel string similarity/keyword comparison

I have an excel sheet with two datasets and each of them having two columns namely MinistryName and Revenue. I need to match MinistryName in Dataset-1 with that in Dataset-2 and note the revenue.
First I thought it was easy and I can use vlookup to grab all the values from second dataset but then I realized that there is slight difference in names. So vlookup didn't work. Take a look at the below sample values from two datasets.
Dataset-1 Revenue
-----------------------------------------------------------
High Office of Anti Corruption 78.67
Central Statistics organization 6.56
National Academy of Sciences 54.21
Dataset-2 Revenue
-----------------------------------------------------------
The High office of Oversight and Anti Corruption 86.00
Central Statistics Office 12.40
Science Academy 75.91
There is a lot of data in spreadsheet having similar values in Name column. I know that for example;
Central Statistics organization is the same as Central Statistics Office logically but how i can compare them in excel. Using vlookup excel will always assume that they are different.
Is there any string comparision function in excel by which i can compare keywords or compare two strings for similarity? The need is that I want to pick Revenue values from Dataset-2 and put them after Revenue Column in Dataset-1. It will also be useful if any one has solution using VBA function.
The MS fuzzy look up may be what you need here. This allows for "fuzzy" searches which is those that essentially are within a certain distance of differences from each other.

Resources