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.
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 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 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")
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 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 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.
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?
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 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 a situation where I have to curve fit data, this can lead to different formulas being used with varying constants.
Is it possible to pickup a TEXT based formula and related constants from other cells, and then place this into another cell as a functioning formula. For Example
Cell A1 contains the formula as a text string whether it be y=a+bx+cx^2, or y=a+b/x, etc Cells A2:A6 contain the individual constants, a, b, c, etc
I would then want the VBA to read the text based formula and put it into an output cell as a functioning excel formulae.g
In cell B10: =a+b*A10+c*A10^2
I understand picking the constants up and putting the formula should not be too much of an issue, however trying to insert the variable form of the curve fit is the part that I am struggling with, and am unsure if possible.
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 use this formula for converting date of birth to a number based on today’s date. I have tried to have the number.. 6yrs 6 months to print only 6 not 7 years old. How do I insert the rounddown formula into this formula
I have a spread sheet that I need to insert rows into and then in those same rows, add formulas that display percentages compared to the grand total row. To make it a little more complicated, this spread sheet changes from day to day, so the rows and columns will be different each time. So the code will have to recognize text, then insert the row, then do the formulas in the blank row. The only constant will be that it will always start on Row 5. I have no idea how to start or begin to do this, so I attached a file with a page showing where I am at as an example, and then anther page showing what I want ....
I am wanting to use VBA code to insert the formula =IF(B8="","",VLOOKUP(B8,Information!C4:D200,2,FALSE)) into cell B9 (it is merged to form cell B9:B13).
I have the formula copied into cell M4 on sheet 3 and have tried to reference it but can't seem to do it. I am happy either using VBA to reference it or using a VBA code to insert the text into cell B9
How can i get the formula from sheet 3 into cell B9 in Sheet 1, or simply put the text in.
I need a formula to take a 6-Digit Number and change it into a 7-Digit Number. Probably a if statement would better because i have 7 digit numbers in the same column with 6-digit numbers. I need to insert zero between the 4th digit and the 5th digit of a 6-digit number. For Example:............
I have a spreadsheet with data in the first few columns, then a few columns of different formulae which reference the data.
This spreadsheet is constantly getting rows inserted into it, and I'd like for the formulae to be copied into the new rows automatically, rather than having to copy/paste the formulae every time columns are inserted.
I'm trying to insert the following formula into cell AA11. For some reason I keep getting a 1004 Runtime Error. I'm assuming there is some type of syntax error. I'm not really sure what I'm doing wrong.
I have a table where random records that are automatically inserted when you press the command button 1, I managed to set all columns exept the last column (column O) because I don't know what shall i do to enter the following formula: =