Find heading from current location to another location - core-location

I can find distance to another location by calling [CLLocation distanceFromLocation:]. Is there a corresponding way to find the heading from one location to another? Or do I have to write the trig myself?

Apparently, the answer is "no."

Related

How to select the matching template in Excel

My data is as follows:
I need to find the index of the matching template. Now I am using the complicate finction:
=IF(COUNTIF(A2,D$2)>0,1,IF(COUNTIF(A2,D$3)>0,2,IF(COUNTIF(A2,D$4)>0,3,0)))
Is there any better way?
I know that I probably could just determine UDF with VBA which would iterate through the templates range but I would avoid it.
I can find the best cell based on the template with MATCH().
But I need the opposite direction.
And I know that I could probably use Fuzzy Lookup. But I would again avoid it.
Since we are numbering according to the values we are looking for in the cell, I could not see a solution other than the if command. Because we are looking for more than one template and moving forward.
It's not the solution you want, but it might be a different alternative.
=IF(IFERROR(FIND($D$2,A2),0)>0,1,IF(IFERROR(FIND($D$3,A2),0)>0,2," "))

Find the frequency and location of a recurring word in a cell in excel

How can I find() the location of the Nth occurrence of a word in a sentence in a cell?
Example:
Humpty Dumpty sat on a wall. Humpty had a great fall.
In above i want to find the total occurrences and the location of the word 'Humpty'.
Expected Result:
Occurances location
1 1
2 30
Is there any way in which I can know the above?
I want to use the location of the 2nd occurrence and calculate further if there are more than 2 occurrences of the target word.
Thanks!
Without using vba you can use this formula:
=IFERROR(FIND($B$2,$B$1,1+IFERROR(VALUE(B4),0)),"not found")
Which basically says:
Find the target (Humpty) in the sample text (Humpty dumpty etc..) and start searching from the next position to the last found. If no more target text is found, return not found. The IFERROR(VALUE(B4),0)) prevents an error for the first search which should always start from position 1, but needs to ignore the fact it is checking the location label.
Here's a screenshot of the implementation:
Another solution:
=IFERROR(FIND("###",SUBSTITUTE($A$1,$B$4,"###",$A6)),"")
See image for reference:

Cell Match partial Table element Excel

I have a client name and I want to know if the client is already known having a shorter name of the company.
The client list is more detailled than the client short name.
Exemple : "COMPANY INC US" is known as "COMPANY".
I'm searching for something like this but it doesn't work.
=EQUIV([#Client];Table[Client_short_name]&"*";0)
Thanks for help
You could try index/match, with match looking for approximates (set third parameter to 1).
Or you could use something like this
=ISNUMBER(SEARCH(short_name, full_name))

Find when two different values match in a table

I have a table with location in one column and a code in other. I want to choose a location and code and when both are on the same row, pull out this data.
How would i go about this?
The location and code correspond to a value which will then be plotted on a bar graph as i want to compare all the different combinations of location and code.
I have about 1000 values so some are repeated together many times.
If there is many repeated this might help you with that.
When that's solved I think INDEX and MATCHwould be sufficient

A very small Q on sharepoint calculated formulas

I have a column called "name", I wanna to create a new column to be group. if the file name contains "MDSN", will return "MDSN" file, if not, will reutrn "non-MDSN"
I found a way starts-with(#FileLeafRef,"MDKB"), but I also wanna control the return values, how can I do?
A touph questions for me but can anyone help me out?
Assuming you mean you're looking to show when a string starts with another string then this will work
=IF(LEFT([Name],4)="MSDN","MSDN",non-MSDN")
For Starts with:
=IF(LEFT([Name],4)="MSDN","MSDN",non-MSDN")
For Contains:
=IF(ISNUMBER(FIND("MSDN",[Name])), "MSDN", "non-MSDN")
For More help on Formula:
http://msdn.microsoft.com/en-us/library/bb862071.aspx

Resources