I often find that it would be useful to have a data type for geographic coordinates (i.e. latitudes and longitudes) that would e.g. permit/facilitate formatting negative values as South and West, direct subtraction of one latitude/longitude from another, conversion of degrees-minutes-seconds to decimal degrees, properly formatted axis labels when using Excel to draw maps (at the moment, I am editing the axis labels in the PostScript file by hand, when I don't use chart labeller to paste axis labels in) and so on.
(Time formats could be used, if only they could be prevented from converting hours over 24 to days, which I have not found out how to do.)
Therefore: does anyone know of any Add-In out there somewhere that could supply the lack of a geographic coordinate data type?
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?
My question is about creating User-Defined Data Types. Is there ANY way possible i can create a User-Defined Data Type that declares a variable of another User-Defined Data Type instead of the Pre-Defined User Types like String, Integer, etc?
The following explains my problem in more detail.
I know to create a User-Defined Data Type at the top of the module before any procedures. Like this:
My question is about creating a hierarchy of Data Types.
I need to code 3 Data Types: 1.) MealPlan 2.) Meal 3.) MealItem
MealPlan represents a daily meal plan. It should have a certain number of meals. An example of MealPlan would be "Healthy" and have a total of 3 meals. Meal represents a single meal. It should have a certain number of meal items. An example of Meal would be "Meal 1" and have a total of 3 meal items. MealItem represents a single meal item. It should have a certain number of protein calories, fat calories, carb calories. An example of MealItem would be "Broccoli" and have protein calories of .2, carb calories of .8, fat calories of .1.
By using Data Types, I hope to create meal plans, which are made up of meals, which are made of meal items. The following code creates a Data Type hierarchy for two Data Types. I've examined it closely but i'm still having a hard time recreating it for my needs as stated above.
I have three items I would like to graph, on one chart. The first is %Complete. This is a number figure. The next is the date the item is due to ship. Obv, this is a Date. The third is today's date. Basically, I would like to display in the same chart so that we can see how far a long a project is, in relation with today's date and how much longer we have until it needs to ship.
This is the current display of the chart:
Is there a way to show the ship date, as the 100% complete mark? In order to make it display half-way decent, I had to format the left y-axis to go above 100%. I first tried to format the right y-axis, but was extremely confused to setting values. I figured out that the end date is somewhere in the 40,000 value mark? WTF is this about? Is 1 equal to 24 hours? I assumed that was the case, but then when I pick the value it should end with, it doesn't seem to react that way. I want the right axis to start with 12/01/2011 and end with 5/01/2012. How can I achieve this?
I have a csv file. When I open it by double clicking, all the finance figures appear as currency with the currency symbol. I can use the SUM function on these and it's perfect.
However, when I open this file using a macro, these same numbers look the same, except that they are now left justified and are text because the SUM function no longer works. If I select a range, I get the count of the number of items selected showing at the bottom of the screen but not the sum.
I have tried opening the file using the OpenText function which has several ways of setting a date format to the fields but nothing for numbers.
I have even tried, in the macro, selecting a cell with numeric 1 and then selecting the range and pasting the 1 as a multiply function but this doesn't work either.
I an newbie at VBA but I took some short programing classes back at my college days. I am trying to declare an array with different data types and since that seems to be imposible for what I gather then my other option is to declare what I remember as a structure.
1. One sheet (request type wise) contains request type and the phase which it belongs to. eg request type A belongs to phase 1 and request type B belongs to phase 2. (like wise there are 212 request types divided into 8 phases)
2. The second sheet contains raw data (request type) where the request types are randomly arranged.
What I am trying to do is:
Compare the raw data of sheet 2 with standard data in sheet 1 and paste the phase to which it belongs to with a help of macro/code, since the standard data (212 request types with 8 phases) is huge.
Putting the final touches on a project I have and the last element doesn't work 100%. the scenario: I have a function that I wrote based on the user's input of the desired column to perform the operation. As a method of error-trapping and ease of use, I set instructions for the code to activate:
1) if the user highlights multiple cells of the desired column 2) enters the letter of the column (up to "z", not case sensitive) 3) enters the number of the column
Sub Button5_Click() Dim ColumnUsed As Variant ' find number of columns selected For MyColNum = 1 To Selection.Columns.Count Cols = Cols + 1 Next MyColNum 'find number of rows selected For MyRowNum = 1 To Selection.Rows.Count Rows = Rows + 1 Next MyRowNum..............................
I am working on two spreadsheets, one we shall call Target Sheet and the other Reference Sheet.
On the target sheet, I have a set of 200 geographic coordinates longitude and latitude (in decimal degrees). Each pair of coordinates coresponds to a geographic site.
On the reference sheet, I have a set of 900 geographic coordinates longitude and latitude (in decimal degrees). Each pair of coordinates coresponds to a geographic site. Note that of the 900, 200 are the same from target sheet, other 700 are different sites.
Using the spherical law of cosines, I can calculate the distance between a set of coordinates on target sheet agianst a set of coordinates on reference sheet. This allows me to see the distance from one geographic site, to the other. This was easy. The formula I use is as follows: ....
I have a non-contiguous range of cells that contains Values, Formulas, Text or Dates. In some cases a field containing a value could instead contain a formula depending on who is filling out the form and/or what information is known. For example, a cell might contain a value, i.e. Utilities, and I might either know the total ($76,310), or I might need to perform a calculation right in the cell to obtain the total (=54236+9587+12487).
My goal is to be able to copy the information contained in this non-contiguous range to the right some 52 columns (this is a safe temporary storage location) and then be able to copy it back should I need to.
One other problem may be that the source cell might be a merged cell.
Since I cannot determine whether the information is going to be a value or a formula, and I have some text and date formats to copy as well, is there some way to copy this range and keep the data regardless of format?
My Range might look like: (F4, C5, D6:D7, D9, D13:D15, D17:D18, D22:D25, D27:D30)
F4 is a date field, C5 is a merged cell holding text, D6 is the Utilities field described above. The other fields are all formatted as dollars or percentages.
I am setting up a spreadsheet to be able to calculate loads on spread footings. The thing is the footings may be as small as a 2 x 2 or as large as a 6 x 6 or any combination inbetween so I need a coordinate system (to the nearest inch with a max of 1800 inches) to be able to assign each spread footing to a certain spot in the system with which I can calculate the soil stresses.
I intend to make this as idiot proof as possible for anyone who uses this spreadsheet so I was going to set it up as in the attachment where a user can input each individual load on each footing and the distance between it and its neighbors. The numbers are just random values with in each footing and feet between each one. Naturally most people would probably begin data entry in the upper left footing first so I was going to make that the origin unless for coding purposes the lower left would be best.
In this case the upper left footing would be 0,0 and the footing to its right 20,0 and the one farther right 55,0 (20+35) and so forth.
And can create a scatter diagram fine. However, I've been asked if it's possible to show on the graph, for each point a line to it's respective X and Y co-ordinate. For example, for row 4 (in red), on the same scatter graph, I'd like there to be two lines for this point,
Line1 drawn from (0.1, 0) to (0.1, 0.26) and Line2 drawn from (0,0.26) to (0.1,0.26)
I know it's possible to overlap graphs in Excel, but I can't find how to achieve this with scatter plots
I have a spreadsheet of several sheets, but 7 of them (Red, Orange, Yellow, Green, Blue, Purple, Black) are the guts of the file and where I make adjustments. The layout of these sheets is the same, there are several cells of data on each sheet that coordinate with data in the same cell on other sheets. The problem is the sheets are so big, when I change sheets I have to go find the data that was in the same cell (or close) to where I just was on a previous sheet. So for example if on “Red” I am in cell AX253 and I go to sheet “Yellow” I would like it if AX253 would be selected when I get there. And if I select a different cell like D56 on Yellow and pick Green then I want D56 to be automatically selected on Green.
In addition, I plan to use a check box on an eighth sheet called “White” to turn the feature on and off. I have never written code for a check box before.
Is this to terribly difficult to do? I did some searching and saw some code that was similar to this but could not get it to work.
I do have a 2 tabs with certain sets of data which I need to compare. I have one tab called "NEW" and another one with "PREVIOUS" and unique values in column C in each of them.
I now look for a formular / macro which tries to find the value in cell C2 of the "NEW" tab in the "PREVIOUS" tab. In case there is a match, the cells of columns T to W (of the row where the value was found) should be copied from the "PREVIOUS" tab into the "NEW" tab just to the same place. When there is no success, "NEW PD" should be entered into cell T (of the respective row).
The lists are growing week by week. I can do an offset / match function which will import the plain data, but I cannot get the formats, too. I believe I will need a macro for that but I am too unexperienced to get this to work on my own.
I'm trying to use DGET to pull coordinate pairs from a list and match them up to a label based on certain criteria. I can't seem to get it to work. I'm also thinking that the way I have it set up, the coordinate pairs might not stay together and that has to be the case. My criteria is multiple cell based too and I don't think DGET can handle that.
For example, In order for a coordinate pair to be labeled "B" the x coordinate must satisfy a condition and the y coordinate must satisfy a different condition. Can I use DGET with the AND function?
I have a table showing data for 10 teams. There are however 10 different measures which are pulled from a seperate sheet using a dropdown box to select the measure.
One of the measures is example 390823 which needs to be format 390,823 so that thousands are shown, and other formats are, example, 89.9 which need to be 89.9%.
Ive gone to my other sheet and all the raw data is showing correctly with % and ,s. But my dashboard table can only have one format. How do i make it so that each measure pulls in the correct format when selected, without dragging the whole area and changing each time?
I am trying to populate a listbox with data that is of varied formats and I can't seem to do it! I can get the data into the listbox but not change the formats. I have attahed a worksheet to show the problem. Basically, column 2 of the listbox I want to be in hh:mm:ss.0 format and column 4 I want to be in dd-mm-yy. The strange thing is that the listbox does seem to take into account some formating as column 4 is in mm-dd-yy format already but column 2 is just a number.
The macro firstly formats the data that is pasted into it from an access database, then it does some calculations to determine when 10 working days from a specific date is, and when 20 working days from the date is (these go in new columns at the end of the data). The macro will also add new columns which say "Not resolved" if there is no date in the Resolution column, "Yes" in the "10 working days met?" column if the condition is met and the same for 20 workings days in a different column. As the colouring etc takes a long time I really wanted to add as conditional formatting to the macro!
how to attach a spreadsheet here then I can show you what the outcome we want is. A point to note is that there is not a set number of rows each time we do this, and I don't just want 1 cell to be coloured - I want to specify which cells in the row are coloured depending on the results in another cell on that row.