How would i have VBA draw a line between a two ranges? say i have a named range of "start" and another name range "stop". i want to draw a red line between them. how can i do that with code. this is beggining my education for a much larger project I want to do later in the future.
I know you can draw a line on a userform by providing the start and end co-ordinate of where you want it, but is it possible to have a UserForm appear on call, with the 1st co-ordinate already set (by the programmer) and the user clicks on some point of the UserForm to indicate where they want the end co-ordinate to be, and that a line would then be drawn to that point ?
Can we draw tangent to a curve in excel graphs..? If yes if i could have some demo....** this.. I am working on finding rate ** change at an instantaneous point and average rate ** change ie: secant line
I've recently got a new computer and this problem is driving me nuts. When I click view!toolbars!drawing, nothing happens. No drawing toolbar appears at the bottom of the screen where it used to be. There's a small "drawing toolbar" icon on the main toolbar, but whether this is depressed or not makes no difference either.
I understand this may be changed in the 2007 version, but I’m using Excel 2000
I want to have 2 cells where I can enter 2 numbers (length & height) so that a grid can be plotted. For example, a big sheet of paper size is length 30" x height 8", if first number is 10" (length) is entered, it will plot 3 lines across 30" (cos 30" divided by 10" equals to 3) and if I enter 2" (height) on 8", it will then cut it into 4". Attached a file for better understanding.
In my attached sheet I've to find out final result in Column "F" (green shaded). My boss many times a year increases salary by certain percentage (say 30% or 40%) which is given in "E" column. After that I need to adjust it according to Pay Scale given in right side. For example one Executive's salary reaches 19880 after % increase. Now in pay scale we see in executive (row no. 13) it crosses 19800 so his final salary should be next upper value i.e 20600 (if it reached to 20700 after % increase, then his final salary could be 21400). That is final salary should be multiple of designation's increment plus minimum gross salary (Here 800X10=8000+11800=19800, since it exceed by 800, so salary should be 800X11=8800+11800=20600)
So we can either pull data from right side table or we can give formula in "F" column to get the required result.
I want to use VBA to update a drawing object's color, such as a circle.
For example, pretend I am counting sheep and I need to know when I have reached the maximum count by the visual aide of a stoplight. The script in my head reads: If the max. count of the sheep is less than 5, then the stoplight is green. If the max. count of the sheep is equal to 5, then the stoplight is yellow. If the max. count of the sheep is greater than 5, then the stoplight is red.
Is there a way to do such a thing on excel and with VBA?
is there a code to draw a circle? by supplying the center position and the diameter? for example cell "A1" and " A2" are for the center of the circle position and "A3" for the diameter? and whats the code for drawing a rectangular by supplying the starting position and short length and the long length?
Any way to retrieve values from a combobox on a webpage (For my case there are two values in the combobox.) I know how to manipulate the webpage to choose the values in the combobox and so on but i want my user to be able to see the options they have from my userform.
I have a sheet with 30 textboxes made with the drawing toolbar. The user enters data, then clicks on a button which formats the page to adjust row size to match amount of info. I am having trouble finding the code to store the currently selected textbox in a variable so that I can place the focus back to the same textbox when the macro ends. Can anyone help me with the code to get the active textbox?
I want to draw a (time) line from the top left corner of a cell (say C3) to top left corner of a cell (say i10) in a Macro. Both start and end cells (column & rows) will vary depending on certain input values which I can convert into a cell reference. Line must overlap on both ends by two column widths.
I'm looking to write two small macros that will either hide or show all lines, freeform lines, and autoshapes on a page. In my extreme competence, I determined a for/next loop would be appropriate... but other than that, I can't figure out where to start.
I have a worksheet with 27,000+ rows. Item numbers are listed in column J and quantities in column E. The rest of the data on the sheet is not needed. An item number may be listed multiple times. I'm trying to create a new sheet that lists each item number once with the sum of all the quantities associated with that number. The data is sorted so all "like" item numbers are listed in consecutive rows.
I am working on a huge amount of data and want to analyse that data through charts because charts are quick representation of the data and save a lot of time. I got some code from my friend, to read each row in a worksheet and plotted the corresponding chart on the new worksheet each time i.e., each row has one chart which is plotted on new worksheet each time.
But I don't want it to plot the chart on the new worksheet. I want it to plot the chart on the same worksheet. In my case there are always more than 30 rows, so it should draw 30 charts on the same worksheet in which 30 rows are written.
Here is the code which plots charts on the multiple sheets
Code: Sub LineCharts() Dim Ws As Worksheet Dim NewWs As Worksheet Dim cht As Chart Dim LastRow As Long Dim CurrRow As Long
Set Ws = ThisWorkbook.Worksheets("Sheet3") LastRow = Ws.Range("A65536").End(xlUp).Row
I'm currently drawing rectangle shapes with transparency on top of a graph to highlight certain depth ranges in vba. Rectangles span entire graph width. Is it at all possible to draw the shapes behind the series plots?
I have a macro that runs when a text box is clicked and searches in another excel sheet for a cell with a specified value. My problem is that I specify the string to search for in the code and I would like it to search for the string in the text box that gets clicked.
How do i preventing drawing objects from being modified/ deleted/added on an excel worksheet? edit: but i want people to be able to interact with them i.e. people shud be able to enter text into textboxes.
I am creating a "board game" type game in excel and one of the functions will be landing on a cell. When you are on this cell you click the checkbox to the left of it which then flips the value to true. I then have another formula generating a random number between 1 and 100 if the value is true. I would like to make cards in a separate sheet out of single cells but make about 40-50 of them maybe less. I want it to be able to pull a card(cell's) contents into another cell on another sheet. But I want it to be a random card associated with the random number generator. I can definitely make changes if this isn't possible but the point of it is to show the contents of one of the random cards.
I have a list of part numbers and a new drawing number and old drawing number. I'm am trying to put this list on the second page of a workbook and write a code on thie first page that allows a person to enter the part number and the old and new drawing numbers will be displayed.
I can't find anywhere where there may be some VB code to allow text within a cell in Excel to be circled. I don't want drawing objects, because many times I need to modify 30-40 sheets at one time and Excel doesn't allow you to alter drawing objects when you have multiple sheets selected. Therefore, I just want to be able to apply a circle around some text in a cell the same way you would underline it, for example. I figured my only hope is VBScript?
I have the data to import / read in a pdf, in a doc, or in an Excel worksheet whichever is easier to use. I need to import the data, parse it into the correct cells for that row and then repeat the import until the end of the file. Not all the cells are in each group of data to import, so those cells will be null for that row. Some of the data for one cell may be in up to 14 lines in the data file. I have be concatenating these data rows into one cell. There are 48,000 lines in the file to import or I would do this manually. I am assuming that doing this in VBA would be the most efficient method.
Our small family business has a mailing campaign that we track with excel. However, we're very concerned about users opening the macro-filled master spreadsheet. Instead, we'd like a macro to do everything for them.
When a letter comes back in the mail with a bad address, the user types the Street number and street name such as "1234 Main St" into $A2 of c:dropbox eturned.xlsm, presses the macro button, and it should do the following:
Opens and Searches "Sheet1", "column S", in the file c:dropboxmaster1.xlsm, and finds the LAST instance of the address typed.Selects that entire rowCopies the entire row.Pastes the contents into the row of the active cell in the destination spreadsheet, overwriting what was there before. Such as $2:$2 if the address was typed in $A2.In the master1.xlsm spreadsheet, sets the entire copied row color to "gray".closes master1.xlsm and saves changes.
The end result is that the user now has an identical row of information in their spreadsheet, and the master spreadsheet's row is colored gray indicating it has been completed.
Other notes:I'm open to more efficient steps than this if you have them.There are approx 5,000 records to search through in master1.xlsx at any given time.
I have about 180 workbooks which I need to compile into a Master Schedule.
All the tab 1's are different, these feed into tab 2, which the data has the same formatting throughout. The 2nd tab has the same data for A:F 1 but cells A:2 - F:2 down to row 9 are populated from tab 1, therefore different in each. I am trying to get a Master schedule that lifts the data in the fed cells into a line by line spreadsheet?
Is there a way I can get excel to look at a folder, then every workbook in it, the at the 2nd tab in every workbook, then list the cells as described above? I am not after a consolidation of this data, but a full list?
how VLOOKUP can be used to look up cells with auto shapes or drawing objects with a number next to it. I keep getting the value in return but the auto shape/drawing object is omitted from the answer. I use Office 2013.
I have a "Generate Table of Contents" button that launches a macro. This macro builds the Table of Contents, creates (3) columns (Patient Name, Date of Pickup, and Frequency), finds all of the sheets in the work book (already renamed to a patient's name), sorts them alphabetically, and lists them under the Patient Name column.
This code works great - The next challenge:
On each sheet (which corresponds to a patient in the database), there is a cell that is filled in that states which day the patient picks up their medication. There is another cell that designates how often they come to pick it up.
I am at a loss as to how to direct the macro to: For each sheet, go to the specific cell, and then report it in the table of contents.
It somehow needs to bind the information together... meaning the patient name, date of pickup, and frequency must be displayed correctly each and every time on the same row.
I'm using Excel 2007 and I am taking the contents of various user entered cells and creating drawing textboxes to display this data using VBA. How would I get VBA to resize the width of the textbox so that the text is displayed correctly in the textbox i.e. there will be variable lengths of text in the cells so I currenly can read the full contents?
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'm trying to combine 2 cells that both have text on multiple lines separated by line breaks. I want to keep the formatting so that when both cells are combined, line one from cell 1 and line 1 from cell 2 are on the same line in the new combined cell. This is easy to do when there is only 1 line in each cell but how do you do this for cells with multiple lines? Here is an example of what I am trying to do:
A B C
1 First Name: Last Name: Address: John Smith 123 Harold Street First Name: John Last Name: Smith Address: 123 Harold Street
I need to read or clear all the line in specific range which will be increasing dynamically. Problem is "Selected File List" table range is not specified. New file chosen with browse will be added to "Selected File List" dynamically. Number of file can't be predicted.
What I've tried so far is, keep track of the browse button click and add the file path to arraylist. After that, (Row number 9 which is start line + arraylist size) to get the number of line of end of the table. But due to some requirement, I want to read the file from excel file. Something like -Read until found blank line or border bottom or something.
I'm new to VBA and I'm not so sure what I'm doing with vba codes