Group Of Decimal Coordinates - How To Pool Those Which Are Close One Another
Jul 5, 2014
How to set a formula to calculate distances (by using a function I provided) among all the observations (each one with a latitude and longitude value expressed in decimals) in an excel sheet. Here it is the previous thread.
I slightly modified the solution MarvinP suggested to me by using my own function to calculate distances among coordinates.
Attached you can find the excel with this. You will see that on the right side of the sheet, in yellow background, there is a matrix whose non-blank cells each one reporting a case of close coordinates (e.g.: 4-5 means that observations 4 and 5 are less than 15 Km apart one from another). Cells of the left-side matrix contains the function used to calculate distances among each observation with any other. Matrices are 116X116.
However, I am now jammed because I don't find an easy way to pool the observations found to be close each other (I have used a distance threshold of 15 Km - you can see it in the formula inside each cell of the "yellow" matrix").
The ideal way to establish new coordinates values for observations close one another would be by using coordinates which are at an intermediate position, however, this is not my priority, it would be OK also using one arbitrary value for all of them, i.e. picking up one pair of coordinates of one of the close observations and attribute this to the other. I have seen that, by excluding nonsensical similarities (e.g. 1-1, 2-2, etc.), there are groups of close observations of size 2 (e.g. 4-5) up to 10 (nine observations very close to a given one).
Basically, I want to format a group of cells to display 1 decimal figure if the number is not a whole number. If the number is a whole number (or if the rounded first decimal place is 0) I want it to display no decimal.
I have a pivot table of values displaying agency's performance based on their sales percentage to target. When the race is 'loose', and all companies are 1 or more percentage point away from each other, I format the values without decimal places. If two agencies appear tied, I add a decimal place to seperate them. Occasionally the race is really tight and I have to increase the format to two decimal places to seperate them. how to do this automatically?
This might be a little long/difficult to explain so I have attached the excel sheet for viewing.
I am trying to adapt cell I11, which now equals cell B10 or B12 (depending on where you type in the "x"). I am trying to formulate it to be either cell B10, B12, B18 or B22, I want it to read the highest seed number (5, 6 or & 7) again depending on where you place the "x". Let me know if I have left anything out.
I have Excel file A with a full list of IDs that were selected to take part in a study - about 5000 IDs with only one field "ID". I also have Excel file B with about 1500 ID of people from file A BUT who already took part in the study. Now what I need to do is filter out from file A all the people in file B so in file A I am only left with those who didn't take part.
I need to use VBA read all historical data files, then, copy all the data from those files to Sheet[FX Historical Data] and Sheet[Position Data] respectively.
First, I copy a code from the text book, which allows me to copy one data files every time. Now, I have only 6 files need to copy, but if there are thousands of files? I try lots of codes but I still cannot find a way to solve my problem.
Second, can I use the function of "folder dialog open" to select the data files I want, and then copy the data inside to Sheet[FX Historical Data] and Sheet[Position Data]?
I have a football pool I am doing with my family. I would like a macro that displays a message box that tells me the leaders of the pool using the grand total number. So in my attachment, the message box would say something like:
Sue is in first place with 12 points, Bob and Dave are in second place with 9 points, Larry is in third place with 3 points
It doesn't need to be exactly like that, but you get the gist of what I am looking for. The catch here is that the grand total row changes each week as I add games in, so the row moves down every week. I need the macro to stay with the grand total row from week to week.
I run a small town pool league and use excell to track player handicaps, ect. we use a simple system for handicapping. Players can be from 2- to 7+ (2- 2 2+ 3- 3 3+ 4- 4 4+) and so on. if a player is a 2+ and wins they go to a 3- and so on. I want to be able to just type a W or an L and have it look up the players previous handicap and return a new handicap in the next field. I've allready figured out how to count the W's and L's and return the total for a teams weekly wins on another page, and give stats on a players wins and losses. I then print each sheet out weekly. Teams have 8 players but only play 5 each week so some players might not play for 2,3 or more weeks. I also use access to keep track of all the people that have played in the league. some players play a few sessions then quit for a few. this way i can keep track of their handicaps when not playing and havew a list of all the people that have played in the league. Can i get excel to transfer a players handicap to access each time it changes?
I have a vba macro that takes data from one workbook and pastes it into another workbook. In doing this I have declared a few variables of type single (I only need two decimal precision). However, when I copy the values from the cells on the source workbook and paste them into the target workbook, the numbers end up having 12 decimal places. Ultimately, this extra precision causes my totals to be off by .01 or more after a while. I have tried rounding the number as I pull it off the source workbook into the variable, but that didn't matter. How do I solve this problem? Code for pulling data from source workbook:...
I need to convert a column of numbers currently formatted with 2 decimal places e.g. 112.12 to 4 decimal places (without the decimal point). I need the end result to be 1121200. I've tried a few different suggestions given on the forum previously but can't seem to retain the 4 decimal places that I require.
I am trying to create a unique sample code by putting together the values of other cells that a user will input. It's all working well apart from the last part, where I am trying to include a decimal number. I want the decimal number to appear without the central "." and in a four digit format. e.g. 2.5 would appear as 0250, 14.25 would appear as 1425. This is the formlua I am using currently:
However, where the value of H4 is 2.5, I am getting a result of 0303 (I've put this part in bold). I have attached a small spreadsheet to aid understanding.
It’s been working perfectly up until around an hour ago. However, now when I close Excel, I get compile errors.
These compile errors seem to be because Excel is trying to access controls in the workbook after it has closed. Since the workbook is closed, VBA can no longer ‘see’ the controls, and therefore it thows up errors.
I’m also getting a similar error on a Worksheets("DataExplorer").unprotect line, which seems to be because the worksheet isn’t there after closing.
These errors only occur when I close the whole excel application using the big cross in the top right. If I just close the workbook (using the smaller cross just below the big cross in the top right of excel), it doesn’t throw up these errors.
Just to clarify: all of the code runs perfectly when Excel is open. The errors are being thrown up for lines of code which run without problem until Excel is closed.
I am trying to write VBA code that groups cells between blank rows and inserts a message if a string of text (a name) is missing from the entire group. I want the code to search cells in column A and group the cells between blank cells. Use the name I input in an input box as the search criteria and insert a message in the Column C next to the last blank cell in the group and then move on to the next group and highlight the cell in red with bold text. I am including a spreadsheet with an example of what the sheet should look like before and after the code is run.
I have date fields as column labels in a pivot table. When I try to group them I'm only given the option to group by integers and not by months, years etc.
I've had a look at the format settings of the column and they are formatted as date fields.
I need a formula to multiply only the decimal number in a cell and not the integer. For example: the number in the cell is 57.3615. I want to multiply .3615 only.
I have several groups of data in the same sheet. Each group has two blank rows above the first row of data. Each group has column "B" in common (e.g., "Phone" in the example attached). I'd like to add a title/label of "Phone" to the first column in the row immediately preceding the first row of data for that group.
how to use the group box to group a number of option buttons together.
Question is, lets say, i have a total of 4 group box. if i want it to work in such a way where by once 2 option buttons are being selected (1 option selected from each group box), the rest of the option buttons in the 4 group box will be greyed out. is that possible?
I have created a sheet that shows distance between coordinates. Also working on something to put them in order of the closest point. I used a fixed point to find the nearest coordinate, but since i'm using a fixed point it doesnt go the order I want it to. I have attached the excel file I am working on.
how to get a single cell (C2) and (D2) to make the numbering format go from (## ## ##) to (######).
The Excel spread sheet is a coordinate converter, designed to take Degree's minuets seconds and convert it to Decimal Degrees, the formula is set up and work Great, but every time I copy and paste the coordinate to the excel spread sheet, i have to manuelly erase the spaces between the numbers so the formula can work properly. How can i get the cell to automatically delete the space between the numbers to save me time.(I.e 29 35 42.34325 -to-> 293542.34325)
I'm trying to create a spreadsheet that will convert coordinates from DDMMSS.00 to DDMM.000. I found another thread that discusses this same issue, but I was unable to make it work for me. I'm attaching a sample spreadsheet that basically shows what I'm trying to do.
I have an image which i have reduced to a mathematical representation of light intensities. We can consider each cell in my spreadsheet as a pixel, the value within the cell corresponding to how much light that pixel it took in during an exposure. There is a trend along the pixels that i would like to isolate as exactly as possible: a diagonal line, not quite straight from the bottom left corner to the top right.
What I would like to do, if possible, is to treat each cell in my spreadsheet as a point on a coordinate plane, and to use some type of formula or macro to give me a line of best fit using the positions of the highest valued cells as the data points in my extrapolation.
The tool I'm looking for would take data organized like this:
And give me an equation of the form y=1x + b (describing where to find the maximum values among the cells), although my actually data will need to be fit to a higher order polynomial.
Once I can do this, I will also need a way to take perpendicular sums automatically along the line of best fit at distance of two pixels in both directions and a width of one pixel. You can imagine drawing a rectangular box perpendicular to the line of maximum values and adding the proportions of each cell enclosed by that box. This means that for the example above, i would get 209 for all five points of interest: the maximum value plus the two values of one in the upper left perpendicular direction, the two values of one in the lower right perpendicular direction, half the values of the two cells neighboring the exactly perpendicular cells and a quarter of the outermost cells touched by our imaginary pixel box.
The following image may be useful in clarifying what I'm looking for. The red bar represents the imaginary box containing perpendicular pixel sums, where the green beam is the line of best fit derived from my maximum values.
Attachment 337419
Also, here is a snippet of my actual data to experiment with in solving these strange and exotic problems
I am trying to extract (and separate into 3 columns) the numbers only, positive or negative portion of (XYZ) Coordinates copied from AutoCAD and pasted into column A X = 96179.9699 Y = 61973.9793 Z = 1368.0025 In column B,C and D, I have tried to use Find Mid and other means
i use a Trimble Total Station Survey equipment, This is used for suveying and measuring distances between points on jobs. These points can be exported onto the pc as a text file and imported onto excel, the file has a northing and easting to locate the point these are comma separated.
I would like to know if excell is capable of working out a distance betwen two of these such points by using the two pairs of northing and easting coordinates. The maximum distance between two points is no more than 50 meters. If for example when imported onto excel point 1's coordinates are locted in cells A1 and B1 and points 2's coordinates are locted in cells A2 and B2.
I have a userform, on it is a very large command button with a picture of a map loaded on the button. The button is 500 width(X) by 500 height (Y), so the center of the button would be at the location 250 (X) by 250 (Y). The button is coded for mousemove to get the X,Y cooridates and when you _Click the button a textbox gives the distance to the point(mousemove) from the center of the button. All that is good, but now I'd like to find the degree of the point referenced to a compass, ie, if the point is at 250 (X) and (Y) is less than 250 then the point would be due north at 0/360 degrees and if the point (Y) is greater than 250, it would be south of the center of the button. I hope this make sense. It's been a long time since trig. I've been searching but can't seem to find the correct formula to figure this out.
Here's the other problem, I'm doing this in powerpoint so I'm not sure if cos or tan functions are loaded in this program. I am posting this in the xl forum because I figure that's where most of the people who could figure this out are. If this is in the incorrect forum I can try to move it,
Is it possible to create a chart using spherical coordinates (radius, theta, phi) in Excel? I want to create something similar to this. I would even be willing to write add-in code to create the graph from scratch, but I don't know if that's possible. Is it possible to create a new chart type without using the other chart types as a base?
I have 2 columns of longitude and latitude coordinates. I want to count coordinates within certain ranges. A bit like using the Frequency function but for 2 sets of values and 2 bins arrays. This would mean I could create a table with latitute bins as the row headers and longitude bins as the column headings. Would anyone know how to do this?