I have a folder of numbered graphic files (500 odd) and want to insert the correct graphic in a spreadsheet depending on the value of a cell (the value will be the graphic name). Thus everytime the cell value changes, the correct graphic file will appear.
On the attached Excel file, I have code that will insert a variable number of rows and copy and paste from and to variable positions. That all works fine when run from a command button, but when I try to run it from the Worksheet_Calculate by entering 1 in J1 or K1 (inrange cell is J1+K1 for testing purposes) the CommandButton1_Click sub runs continously until an error occurs.
I've got a couple of graphics that I want to include in one of my spreadsheets, and I just want to anchor them to a cell. Nothing fancy, no macros, no formulas, nothing like that.
I want excel to compare both curves, like the maximun % of difference between them. I dont have to same points for both of the curves so i cant do it manually.
I've been trying for some time to reproduce this type of graphic on Excel with no success. The only thing I know is that is a scatter plot, but that trendline and the %error lines are beyond my understanding.
I'm using Excel 2000/2002. I have a workbook with 12 sheets named Jan, Feb, etc. I want to add a new sheet (Report) with formulas in various cells to get data from a cell in a particular sheet.
For instance, in a cell of the new sheet is: =Jan!D64. I want the user to be able to select a month from a drop down list and for the formula to change sheets depending on the month selected. The formula should be: =(sheet name!)D64. I tried playing with INDIRECT, but maybe couldn't get the syntax right. I can't use macros, the Excel is on a server and they are not permitted. The end user is less knowledgeable in Excel than me.
I had a quick question for something that should be simple but I can't figure it out. I have a column of sorted values, it goes
A A A A A B B B B B
and I want to insert a row to separate the A's from the B's. But there will be a random number of A's. I can figure out how to count where the A's end. But I can't figure out how to insert a row. Any suggestions? I tried the two below but they don't seem to work. The for section is counting the A's, and it works, it's what comes next that's giving me a headache!
I am currently building a template for a project that will allow users to upload raw data which is then converted into a report. Part of this report is a cover page that has a graphic or picture on the front. My question to everyone is this...
Is there a way to put a formula either embeded into the picture, or above the picture, or putting the picture in the background so that the formula can do its beautiful magic and collect the information it needs for the cover?
My goal is for this picture to have the data on top of it without a border so the picture is the background image basically.
I got one excel document with a graphic that i want to be seen on a other excel document. But the data on that graphic must be able to mutate with the original excel document. It is just to function as a dashboard. How can i fix that.
What I want to do is reference a cell, if the value is 1 display a graphic image of a GREEN light, if 2 display image of YELLOW light and if 3 then display image of RED light.
I know I can use conditional formatting to set a cell's color based on value, but I want to use a more eye appealing graphic image (.jpg) to be displayed.
Any suggestions as to how this is best accomplished?
So for eg Col A Col B Col C Col D are fixed and then there are variable no of columns - Col E Col F and so on....
I have to insert columns after the last colum ie in Col F in this case.
However, the new column (lets call it Col G) will give a value with formula that connects Col E value with Col B (fixed)value. Again Col H (another new col) will also give a value with formula connecting Col H with Col B(fixed).
Easy to do in normal scenario but when I record macro in excel ( i cannot write VB), the variable columns make it difficult.
I have the following line of Selection.AutoFilter Field:=1, Criteria1:="=2009_15", Operator:=xlAnd
The highlighted portion is going to change from week to week. I have never been able to put a variable inside of quotation marks. I am sure it is simple, which explains why it is out of my mental grasp. how I can assign a variable in there?
how to present some data in a graphic or pivot table graphic.
I have 2 columns with a list of competitors (competitor 1 & competitor 2) involved in a negotiation + the price/value of the negotiation. Each line represents a negotiation with a value in numbers & the names of the 2 main competitors involved.
I have around 150 lines in the original file and would like to show in a graphic what are the competitors that we regularly find in the negotiations and what is the value of the negotiations they are involved.
The problem is that there is no main competitor so i can find the same name in any of the 2 columns and i cannot make separate graphs for each column because if i do so i duplicate the value.
Is there any way that aggregate this info into a single graphic/pivot graphic? Im using excel 2013
I have a horizontal graphic chart showing Intel and AMD processors speeds. I was wondering if it is possible to tell Excel to apply a color to Intel processors bar and another to AMD ones?
I have two variables - the number of stages, and the number of people.
The stages will start in say C22 through G22 (if there were 5 stages). The number of stages will vary upon a user-inputted number in A1.
The names of people will start inB29, so I'd like to insert the simple formula (=Max(C23:C28)) across cells C29-G29 (again with my example of 5 stages), with relative references to the columns, of course.
Ditto for the next name in B30, etc, so that I get the max value for Person#1 in Stage 1, 2, 3...Person#2 in Stage 1,2,3...
I have the following code to execute a connection to a DB and return the result of the SQL statement. I have a variable in the statement that I want to be able to change from user input in a single cell. Unfortunately I am unable to get this to work.
This fails and gives me a debug error, however if I declare the condition I want the code executes fine. This would mean having to update the code every time the condition changed or putting the whole query in a cell on the sheet which I do not want to do.
I would like to create a change event macro that will update multiple formulas that pull data from various tabs on a file. The tabs are named with a single date. So ideally when a certain master cell (Allocation!H2) is updated to the current date the macro will be prompted to update the range that contains formulas and update accordingly...so its and index match fomula based that has a variable being the tab name which is a date. I have a range of dates in cells F4:AB4 and want the formula to go into F5:AB5, I can then fill that down to whatever row I want...that bit I can handle.
Private Sub Worksheet_Change(ByVal Target As Range) Dim KeyCells As Range Set KeyCells = Worksheets("Allocation").Range("H2")
I have a bit of a curly one - I have a sheet with 9,000 records that I need to expand to 24,000 + on a separate sheet records using the following method:
1) Select and Copy entire row 2 from sheet(1) 2) Insert a number of new rows into sheet(2), based on the value of cells(2,8) or cell H2. Column H contains quantity values for each of the 9000 rows which are variable. 3) Repeat for row 3, copying and inserting into sheet(2) based on the value of the cell in H3. 4) loop through all records until complete
I have tried writing the code in VBA but am not even getting close!
I am after tips on creating a macro in Excel 2010 where it will search a list of folder paths in a column on a spreadsheet and insert a jpeg within the sheet from that folder if it exists. If more than one jpeg exists i would like it to insert the first jpeg only. i have found tips where it will insert images if you know the filename, however I don't have this luxury as file naming routines vary from folder to folder the only constant is that the file is a .jpg format.
I'm working on some code that's part of a userform. To illustrate what I need, I will give an example. A column letter, 'J' for example, is stored in colNum.Value taken from the userform. I need both a column inserted before column J, and data entered into that new column in row 2 (thus J2, which would now be blank).
I have 2 columns with a list of competitors (competitor 1 & competitor 2) involved in a negotiation + the price/value of the negotiation. Each line represents a negotiation with a value in numbers & the names of the 2 main competitors involved.
I have around 150 lines in the original file and would like to show in a graphic what are the competitors that we regularly find in the negotiations and what is the value of the negotiations they are involved.
The problem is that there is no main competitor so i can find the same name in any of the 2 columns and i cannot make separate graphs for each column because if i do so i duplicate the value.
Is there any way that aggregate this info into a single graphic/pivot graphic? Im using excel 2013
I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.
I have the following code (just pasting the relevant section) which crashes when it reaches the highlighted line of code. and a dialog box pops up with the text: "Object variable or With block variable not set"
Sub test() Dim StartRng As Range Dim Buffer As Range
I have a master data sheet with four columns, A, B, C and D
Column A has the primary data and B,C,D has dependent data values;
So when I insert a new cell in Column A with cells Shift Down, I want mandatorily new cells to be inserted in the same row in col B, C and D as well so that data integrity is maintained;
I'm fairly new to macro's and VBA, by searching on the internet i've copied and pasted some code together into a macro. But it ends in a Run-time error 91...
The macro opens a target .xls file in a selected folder, performs copy - paste actions from masterfile to targetfile. Than it filters data in the targetfile sheet1 and copy's the results to the various other sheets; saves and closes the targetfile. The next target file in the folder is opened and the actions are repeated in this second target file. For the first target file this works smoothly; but for the second one (of a total of around 100) it does not copy the filter results to the other sheets in this workbook. The error message i get is: "Run-time error 91:Object variable or with block variable not set." When i hit debug it highlights the line "ActiveSheet.Next.Select" which, at least in the first file, seems ok.
I need a macro that will create a sheet at the end of the workbook.
Sum data from a variable amount of sheets and display that data on the created sheet.
Here is a step by step:
Starting on sheet 5.
Column D has a variable amount of part numbers in it. These part numbers would be different between the ascending sheets.
Column T, U, V has an inputed number in it that would need added up across all duplicate part numbers in all the sheets.
(Note: The data would also need started on row 4. Everything above row 4 is headers)
Here is a small example:
D E T U V 13019090W Part A1 68705500 Part B1 64202900 Part C-11 59634600 Part D1 26005300W Part E1
I need the macro to start with sheet #5(starting on row 4). Check to see if there is data in column T, U or V. If there is, to create a new sheet at the end. And copy the entire line into that sheet (starting on row 4).
After that, to check every sheet after (excluding the newly created one, starting on row 4) for data in Column T, U and V. And then check for duplicates in Column D on the newly created sheet. If there is a duplicate to add/subtract that number in Column T, U and V to the SUM in column T, U and V in the newly created sheet. If there is no duplicate, to copy the entire line to the new sheet.
So that when finished. On the new sheet, you have the SUM of T, U and V for everything that has data in T, U or V for all of the previous sheets, plus the entire line of the first instance (excluding the first 4 sheets).