Can Excel Draw Shapes or Angles based on Data? I have a radiation Excel file that solves for Radiation intensity using Distance and shielding as reducing factors. Similar to a circle of light being less intense with distance so is radiation. I need excel to draw a circle from a point specified based on a value I give. For example at 1 ft I might have 500 R in 1 hour (life threatening!) At 16 feet I have about 2 R in 1 hour (not safe for too long). These circles would be overlayed on an map. I would like to draw a new circle at various distances, simialar to a bullseye. I would also like a triangle drawn based on angles and SIN / COS / TAN formulas
Iv got Column A with angles between 0 and 1.56 radians. These angles are generated randomly, so it can be 0.22, 0.56,1.55 etc etc...Now in column B Iv got to carry out a function. The function is =43.22/COS(AX) X depends on the corresponding value in column A.
Every thing is fine up to here and I can do it...BUT I only need to carry out the function if the angle in Column A is smaller than 1...And if the value is bigger than 1 it only needs to output a value of 80. Thats it so...depending on the value in column A it will either carry out =43.22/COS(A) OR just make it show =80.
I have data sent to me describing angles as integers from -180 to 180. I need to average these angles together. For example, the average of 10 and -2 should be 4. Great. However, the average of 175 and -175 should be 180.
Has anyone ever worked with this type of issue?
(I've thought about converting -175 to 185, but then I have trouble with 5 and -5, which becomes 355).
I should probably note that I have a list of angles, not just 2. The analysis I need to do is 1) average of all angles and 2) difference from the average for each angle.
I have a map of the US composed of 50 shapes (one for each state). I need each shape to appear or disappear based on a value in a corresponding cell. I can't use VBA for this as it needs to function for users in a high-security Excel 2003 which doesn't allow macros.
I'm trying to plot a chart of some sort in Excel to display 4 angles that different blood vessels branch off the aorta. Ideally I'd like to input the values of these angles which would vary from patient to patient and have them be displayed in some kind of chart. The chart I'm hoping to achieve would be cirular with the 4 angles represented by spokes which extend out all of the same length. I've attached a rough sketch to show what I'm trying to achieve and I'd be hoping to be able to change each angle in a worksheet and have the chart update to reflect.
I am trying to do here is select a value from a drop down which is linked to a formula which triggers the macro shape..i have all that down already... but the problem is that I will have multiple values in the same drop down and I needed to figure a way to delete the previous macro shape in that range. And so i have created the delete all shapes code below but it seems whenever I use the code it deletes the data validation drop downs
here is what I have so far...
Function Macro() ' DELETEALLSHAPES ' ' ActiveSheet.Shapes.AddShape(msoShapeRectangle, 220.5, 105.75, 92.25, 51#). _ Select End Function
I was looking for some code to randomly generate a number for a prize draw I am doing. I found a great piece on this site, which I have slightly changed to give me what I have below.
It works great except for one thing I cannot work out, I have the code below working on cell "C1", I would like it to work in cell "C5", but I can't seem to work this out.
Sub SlotsNum() Dim w As Long, x As String, y As Long Randomize x = Format(Int((Range("B2") - Range("B1") + 1) * Rnd + Range("B1")), "0000") For y = 1 To 1 For w = 1 To 250 Range("C" & y) = Int(8000 * Rnd) Next w Range("C" & y) = CInt(Mid(x, y, 4)) Next y End Sub
Also, whilst here. i will have one other problem, with it being a prize draw I do not want to draw the same number twice. At the moment I have a small macro that copies the winning name that appears on the main screen (via a vlookup) onto a winners spreadsheet. I am thinking of then creating another macro that replaces the winning name on the master list with an "Already Won" entry, so we can just select again.
i have faced a problem i want to draw straight connector using code imagine when you select straight connector to draw line mouse cursor changes when you move it to a node i want to do this with excel vba code without going to shapes and selecting connector.
I have this Command button that switches on and draws a line. If you press it again then I need to delete that line.
If I push the button multiple times Excel keeps changing the name of the line. I have multiple lines on the same worksheet and text boxes but only this 1 line needs to be delete. I would think that theres a way to assign a permanent name to this line and delete and recreate it but...
I have a 5-column listbox in a userform. I do not know how to make the column borders visible. If somebody can tell me, that would be great.
If not, then the next alternative would be to manually draw a line. I tried to so one, by creating a Label with a width of 1, and backcolor ot black. This works but not in front of a list box. For some reasons it cannot be brought to front/forward (order) of a listbox, I already right-clicked several times and sent tthe order to front.
I have attached a very simple example of what I am trying to achieve.So we have 2 sheets. a sheet called data and a sheet called results.
the data sheet, includes ID's of employees and what they are measured on - Hours and Accounts Finished.For example, worker 123 put in 100 hours from the 200 expected and finished 100 accounts from the 200 expected. The main sheet called Results looks up in a list every ID and displays in a table the compensation the worker got. Each time you select from the drop list a different ID number it shows the result and the amount of money they got.
I want to be able to draw every worker and display the compensation they got('Results', H11) in the Pay amount column('Data',H3:H11).
I have a worksheet set up as a draw sheet for a tournament. I have a set of rankings showing all points collated from last tournament. What i want to do is set up a formula/macro so that a cell containing a player eg. the winner will be found on the ranking list and the points won will be added to the next cell on the ranking list.
I've recently come across this wonderful site and have found it to be a pool for great information. I looking for some assistance with finding a macro that will draw circles/dots on a worksheet when the left mouse button is clicked at the mouse cursor location. There may be something out there already??? Here's exactly what I need; I want a macro that will draw 7 different coloured circles (blue, pink, cyan, lime green, red, yellow, and orange) on a worksheet. The macro would be activated from a button (7 different buttons- one for each colour) on the worksheet and when the left mouse button is clicked the coloured circle is drawn at the mouse cursor location.
I'm running a Secret Santa DJ competition this year and today now wish to make the draw.
Basically all entrants send in their mixes (in this case - upload to a webserver) and I then wish to try and use Excel to make the draw.
What I'd like to do is have a list of all the entrants in column a, use RAND() in column b to assign them each a number, and in column c use the list of entrants in column a to assign each person a mix to receive.
Through my browsing and searching on here, I came across the following (entered as an array); it's brilliant but unfortunately gives me duplications.
way to calculate the drawdown for a futures trading account’s equity. The following is the record of taking a sequence of 20 trades. Drawdown is defined as the lowest point between two consecutive equity highs. Therefore a formula should detect pairs of equity highs and then find the maximum difference between these highs and the lowest point in between each of these pairs. Do you think this can be done using standard excel functions?
You might wish to plot a linear graph to visualize the equity. Looking forward to hear what you think! I include more examples of equity records.
formal definition of a drawdown:
Drawdown: The magnitude of a decline in account value, either in percentage or dollar terms, as measured from peak to subsequent trough. For example, if a trader's account increased in value from $10,000 to $20,000, then dropped to $15,000, then increased again to $25,000, that trader would have had a maximum drawdown of $5,000 (incurred when the account declined from $20,000 to $15,000) even though that trader's account was never in a loss position from inception
Currently we have data that is plotted to a scatter plot along with an already defined line. Next, with a straight edge we attempt to draw a line parallel to the already defined line through the scatter points of data. We basically find two points that give us the best fit to the original line. What I attempted to do was calcualte the slope of the original line and then the slope of each combination of two points in the data set. I then subtracted the slopes, found the minimum difference and thought that would give me the line most parallel to the original. This doesn't seem to work. I'm at a loss, any advice?
I came across an issue on the pivot table after refreshing data. I always need to manually redo the border and formatting. I figure that it is because every time when some new group have move to another day, it change the pivot table layout again and so on.
1) I manage to draw border for Day 1, 2, 3, 4 and 5 but 'Beyond Day 5' i dont know how to do it. 2) Sometime some Day X will have no data then i will have problem with my script. (example pivot table doesnt show Day 2) 3) Possible to do looping for that?
I am trying to automate drawing a flowchart based on a moel which the user can add or remove nodes and links from at will.
I can add shapes and position them but what I want to do is to insert connectors between existing shapes (I can draw two shapes and a connector at the same time but what I want to do is add a new node and then work out which existing nodes it links to and draw the lines)
Code: Function AddConnectorBetweenShapes(ConnectorType As MsoConnectorType, _ oBeginShape As Shape, oEndShape As Shape) As Shape 'The ConnectorType can be one of three constants - msoConnectorCurve, msoConnectorElbow, or msoConnectorStraight.
I have the below code that i am using to generate a random number between a user defined lower limit and upper limit (these limits are set in cells "B3" and "B4" in worksheet "DRAW"), the random number that is generated displays in cell "B7" on worksheet "DRAW".
The code also allows for the draw result to be stored on a second sheet called "DRAW HISTORY", on this sheet the draw result, date and time are recorded (the date and time are stored on sheet "DRAW" in cells "C20" & "C21" and these values are pulled to the result sheet by the macro).
What i would like to happen though is instead of the random number displaying instantly i would like the numbers to cycle for 3 seconds before stopping and the result being recorded. A much better visual effect than an instant BANG here is the winner.
here is the code i am using to generate the random number and record the result:
Sub testRandom() Dim aRow As Long Sheets("DRAW").Range("B7") =
I am new to Excel VBA and am trying to create a macro that will draw information from a spreadsheet. The code i have written so far is shown below:
Sub Event1() 'Dim Event Date As Double Dim Message As String Dim Ans As String
' Prompt for Data
The section i am having issues with is shown in red above.
What i am trying to do is have a message box pop up with the information as shown based on a date being typed into the the original box that pops up (Please enter a date and click on OK). The following message box then displays the required information from the spreadsheet.
I would like to draw the border for the cells with in the usedrange from column A to BM.
I have the below code, that I was using to border the column D alone. When i change the range from "A:BM", i dont get the intended output. Can somebody tell, what modification, I should do to get the desired output?
I have a bit of code that I saved as an add-in. The code does a couple things: (1) Creates a right-click button that on action (2) draws a rectangular auto-shape that is the size of any selected range.
The add-in seems to loaded correctly.
However, when I launch a new excel sheet, my intent was to have the code (the right click option) be available whenever I opened Excel.
I am researching the possibility of using Excel 2003 WITHOUT a Cad or Drawing package to simulate a drawing. (Consultants inquiries are WELCOME). The idea is to prompt the user (Sales Rep or Customer) for a few key dimensions and then plot out a closed curve based on the coordinantes entered. This shape, which would need to be accurately scaled, would then be sectioned and used as a canvas for dragging and dropping various icons.
Why use Excel instead of CAD?
Other than "everyone" having it, the placement of the "icons" relative to the perimeter of the curve will be used to estimate material costs and generate a quotation like a configurator application.
Key hurdles seem to be the drawing of a curve with cells as pixels and using drag & drop with custom icons - possible as an Add-In?
I have a file with many different row sizes and after calculating the figure, we will need to add up the total for a particular job. Due to the irregular data on each job (some with only 1 line item where sometimes the job have few line items).
The cell to sum already has a formula for the data.
For example, I already have a formula on Column L to get the figures. After few line items, I will need to add a total to the lines item, also on Column L. I think we can uses 2 sets of data from 2 different column as "pointers", Column D and the formula column itself (but I don't know how to). The columns that I need a sum function will be from Column L to X. After doing the sum, can we at the same time draw a sum line? (single top line and double bottom line).
Am I being "too greedy" ? Imagine if we have more than thousands lines of such data to be added manually and to draw these lines manually.