Adjust Formula Range Reference As Columns/Rows Added
Apr 4, 2008
I'm using a template that has formulas using a $ sign to attempt to stop the ranges they refer to changing. The problem is, when I use the template (which involes Access importing some data and adding columns to the sheet the formula refers to in the process) the rows referred to in the formula change in line with the number of rows of data that have been imported. Only the row numbers change not the column headings. So for example:
=( SUMPRODUCT(((Workings!$H$3:$H$1000=Explanation!B9)+(Workings!$E$3:$E$1000="Buy")*(Workings!$J$3:$J$1000))))-998
becomes
=(SUMPRODUCT(((Workings!$H$511:$H$1508=Explanation!B10)+(Workings!$E$511:$E$1508="Buy")*(Workings!$J$511:$J$1508))))-998
View 3 Replies
ADVERTISEMENT
Mar 5, 2013
I have a worksheet used for a car game. Each row is designated to show one particular car that can be used in the game, so let's say that there are 40 cars taking up 40 rows.
Column A shows the car type and model; column B shows the engine that the cars has represented by a number (the higher the number the better the engine is); and so it continues, Column C shows the transmission; column D the brakes etc.
Underneath the 40 rows (lets say from row 45 to 65) I then have a table with spare-parts that can be used to replace the cars existing parts. This Parts-table is also arranged with engines in column B, transmissions in column C, brakes in column D etc...
This point of this layout is that it should be easy to compare each type of part in the spare-parts table with the corresponding type of part already used in any of the cars as everything is perfectly lined up by the columns.
About the spare-parts table: because the inventory in the spare-parts table often are added to or subtracted from, as parts are won in races or being put on the cars, I have created a macro to sort the parts in each column so as to put the best parts at the top of the table and the bad ones towards the bottom - so far so good.
The problem is this - as I add new cars, the table of spare-parts is pushed down worksheet and that means that the macro no longer will reference the right rows. So the question is this, how do I automatically update the macro to adjust for rows being added above it? I am not really interested in redesigning the worksheet.
View 2 Replies
View Related
Nov 22, 2009
I was using the formula below which was working fine for copying across 20 columns and down however many rows, but now the requirements have changed to 90 columns. I have tested this out with the 90 columns but the Indirect function is bogging down the spreadsheet with the constant recalculating.
=IFERROR(INDIRECT("'"&COLUMNS($A$1:A$1)&"'!P"&ROWS($A$1:$A8)),"")
I rearranged the formula to the one below, but how can I have the reference to the sheet name changed as in the formula above without using the Indirect?
=IFERROR(INDEX('1'!$A$8:$AT$115,MATCH($A3,'1'!$A$8:$A$115,0),MATCH("PAT",'1'!$A$7:$AT$7,0)),"")
The sheet reference will change from '1' through '90'.
View 7 Replies
View Related
Oct 28, 2009
I have a sheet titled PartNumbers....which contains in numerical order just 1 column of random 1, 2, or 3 character numerical part numbers. nothing special. and not necessarily in 1 by 1 order. like 45,46,47,48,49, it will skip number more like 45, 49, 50, 55. I have another sheet titled FinalReport.....that takes the raw data i have from the PartNumbers sheet and outputs the data onto a nice pretty looking designed sheet.
on 1 column of FinalReport I have =PartNumber!C2, C3, C4 and so on for the total number of parts i have to fill in the FinalReport sheet for each cell. The Question is, on PartNumbers when I want to add a part, say my sheet goes number 45 then 49 and i want 46... What I do is right click row number and select Insert, that adds a new row for my new part number. Now that move doesn't correspond to FinalReport now, it just removes the row i inserted. How do I get everything to flow to FinalReport?
View 5 Replies
View Related
Aug 6, 2007
I have two workbooks open, Workbook 1 (W1) & Workbook 2 (W2)
W1 has the following data entered in about one of our clients:
A1= Client Company Name
A2= Client Name
A3= Client Address
A4= Client Phone Number
What I would like to do is the following:
In W2, when I enter (in any cell, but let's say C3 for example) that C3 = A1 (from W1), that I can automatically have the following cells D3, E3, & F3 filled in with the same information appearing in cells A2, A3, & A4 from W1 as well.
I believe this must be possible-- I just don't know the right formula & steps to take, to make this happen.
View 6 Replies
View Related
Dec 20, 2007
I am trying to fill in reference cells horizontally but fix the column and increasing the row number as it fills. For examples I want to start my refence as "=A1" in cell B1. I want to copy this reference horizontally to column Z1 but want the refences to be A1, A2,...,A26. Excel only seems to increase columns when filling horizontally and rows when filling vertically. Transpose works but it's an array which would slow the spreadsheet down.
View 4 Replies
View Related
Mar 21, 2008
I have a formula that I want to insert using a macro, so how do I iterate the * values in this line?
ActiveCell.FormulaR1C1 = "='Sheet1'!R[*]C[*]"
View 9 Replies
View Related
Mar 3, 2013
i am trying to build a spread sheet showing materials in a stores tools, materials,and usage ect. i have put all the formulas in for example cell c =sum(b2-a2) to get a remaining stock left after usage but what i need to know is a way to add more new stock onto the sheet because every time i go to add on new stock it just resets itself is their anyway of doing it so that when you add new stock to cell a for example it automatically adds on to the total in cell c??
View 1 Replies
View Related
Jun 19, 2008
Is there a way to make a chart adjust automatically when you add to the source data? I'm trying to use a named range in order to power a chart (something like chart_data=offset(a1,,, counta(a:a),counta(1:1)); the range is working fine). When I put "chart_data" into the source field for the chart, it seems to work fine; it picks up the right range... But when I later add more data, the chart source data field seems to have converted my named range into a hard-coded range, absolute range. So the dynamical named range updates, but the chart doesn't and I don't see the new data. Am I doing something wrong that I need to tweak? Does what I'm trying to do just not work? Is there another way to make the chart pick up the new data without adjusting the range?
View 3 Replies
View Related
Jul 24, 2009
I have a worksheet on which users will enter data one row at a time, in columns A-K. When the user starts to enter data in a new row #, that is, when they make any column in the next, unused row have non-blank value, I'd like the sheet to update the borders of the row for columns A-K. I want the Range from A1 to K# to have full borders, so that the whole data set is outlined and easier to read.
For a bonus, I'd like the formulas from the previous H, I, and J cells copied down into H#, I#, and J#, adjusted appropriately for their reference changes.
Normally, I would work around the edges of such a VB problem by recording the actions manually and then modifying that code as I learned more. But I'm not sure if what I've done is the right way to start that process. I think that if I use the CurrentRegion property, and the Worksheet_Change event, I'll be well on my way.
View 2 Replies
View Related
Oct 23, 2006
How do I apply a formula to every cell in a given column?
I'd like my workbook to store this formula:
=c<current_row> + d<current_row>
in every cell of column P as a default.
This means that even if I do "insert row", I wouldn't have to copy this formula into the new cell.
View 6 Replies
View Related
Jul 25, 2006
Range("B25").Name = "EndMull"
Its fine but if i insert a new row or column then it mucks the whole thing up. Is there away of naming them but if any cells, row or columns are inserted the range will automatically adjust to suit1
View 2 Replies
View Related
Dec 13, 2013
I have a system that generates 4 databases with different types of statistical data. Observed defects, Calculated Defect, Capability and Number of points. I have set up a system for telling me what ranges each section is and I am manually changing the ranges to get my expected results.
Is there a formula that I can use that could adjust my ranges, within my formulas?
View 9 Replies
View Related
Apr 16, 2008
I'm looking for: a cell (in column C) that sums Column C from C6 to the row above said cell. (A Total) So if new rows were added, these values would be included in the sum.
What I'm currently working with is a simple Sum formula, but this sum does not include rows added after the predefined sum range.
View 9 Replies
View Related
Jan 5, 2007
I have a sheet (Sheet 3) that is pre-populated from another sheet (Sheet 1), and the user is allowed to update the numbers (for forecasting).
I have a column ( Total Hours) that I use to total the new numbers in the row.
If the user inserts a row, the Total Hours formula does not follow. This is the Total Hours formula that I am using SUM Formula
(=IF(SUM($G30:$AP30)=0,"",SUM($G30:$AP30))
How do I (Can I) get the formula to cascade into the new row.
View 8 Replies
View Related
May 4, 2006
I have a spread sheet that I pull data from different columns on a particular row. The problem is the code I used works great as long as the column never moves from its current location. Is there a way to use a named range to make the following piece of code work, so no matter how many columns are added or deleted the data is pulled correctly?
View 2 Replies
View Related
Jun 27, 2013
We have created a macro that basically looks for rows that contain an "H" and hides the row if it does.
Users can add new rows throughtout the year to this spreadsheet. and based on certain criteria, an H or U will be placed in a hidden column which the macro looks at and hides any row it finds an H.
The user has to click on the button that has the macro assigned to it once they have finished working on the spreadsheet.
The problem we're finding is that for users who insert/delete rows, once they click the button it takes up to 15 seconds to run through macro (which is ok). However, users who haven't added or deleted any rows and who click the button, they have to wait upto 5 minutes (which isn't ok) for the macro ro run.
We can't figure out why the macro takes longer to run when no changes have been made?
View 8 Replies
View Related
Oct 18, 2008
I have a spreadsheet set up for my son to roll up D&D characters. There's a combo box to select Race and another for Class of character. What I now need to do is automatically insert the correct set of racial and class bonuses into the relevant squares.
The Combo box points to a list of Races on Sheet 0, in cells A3 to A12. The cell reference for this returns a value between 1 and 10 depending on race selected, i.e. 'Dragonborn' yields a 1, and 'Tiefling' yields a 10. Cells H3 to H12 contain the Strength modifier for the different races.
When I select for example a Dragonborn (1) in the combo box, I want the Strength Modifier cell to pick up the value from cell H3, and if i change the selection to Tiefling (10) I want the strength modifier cell to pick up from (obviously) cell H12
How do I use a variable in the cell reference to adjust the cell data is retrieved from?
View 4 Replies
View Related
Nov 15, 2009
How do you make the Autofill function increment in blocks, e.g. instead of increment 1,2,3 increment 1,8,15 inthe following example: I have a 2 worksheets, one with days of the year across columns and values down rows, and another that summarises the sum of the corresponding days in weeks, so I have 365 columns in sheet 1 and 52 columns in sheet2. Everytime I update the sum range i cannot autofill it in the summary worksheet, as A1:G1 autofills to B1:H1, but I want it to increment to H1:N1.
View 3 Replies
View Related
Sep 23, 2007
I have a userform which creates a new sheet using TextBox2.value as the sheet name. Here is the code I am using and it works fine. Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = TextBox2.Value
Here is the problem - After additional code is run on the newly created sheet I need to take the value (Which will be text) from cell AM6 of the newly created sheet and place it on an activecell on Sheet3. Seems simple enough but I do not know how to address this new sheet as I do not know what the name will be. Here is the code I have tried (and various renditions of it)
ActiveCell.FormulaR1C1 = "=TextBox2.Text!R[-9]C[32]"
I do not want to specifically name the new sheet as many sheets could be created, unless you could tell me a way to do that.
View 5 Replies
View Related
Jun 11, 2008
I have 5 columns set up: A,B,C,D,E
D is the sum of A and B
E is the sum of A,B,and C
As I add in a new column to the right of C (call it C2), I need D (which has shifted over one) to sum A,B, and C.
I also need E (which has also shifted over one) to sum A,B,C, and C2.
Essentially I need a function in a cell that will be able to reference two cells to the left even as more cells are added.
View 9 Replies
View Related
Jun 11, 2014
I am trying to work on a index match but can't seem to make it work.
My look up value are on column while the data I want to show and look up array are on rows and still getting 0 results.
Is there any solution ofr this to make it work without altering my look up value & arrays to columns as well?
View 4 Replies
View Related
Sep 6, 2007
I am looking for a formula that I can drag down a column that is pulling data from left to right at the top of my spreadsheet. See the attachment.
View 5 Replies
View Related
Oct 8, 2013
I want to be able to reference cells in a table by using two drop down lists. One drop down for the columns in the table and another drop down for the rows in the table. The values in the columns will be different metal materials (aluminum, copper, stainless steel, etc.). The values in the rows will be thicknesses of those materials (1/16", 1/8", 1/4",3/16",3/8",1/2",3/4",1"). I already created a drop down list for the materials and another for the thicknesses. But now I want to be able to select a particular material and then a particular thickness and receive back in another cell a value that's cross referenced in a table. Specifically, the values in the table will be the weight of the particular material and thickness per square foot. I'll populate all of the cells in the reference table manually. I'll hide the table on a separate worksheet. i haven't created the table yet.
View 2 Replies
View Related
Jun 4, 2014
combining multiple rows of related data into one row but have not seen one that matches my situation. My experience level with excel only includes some basics like vlookup, match and recorded macros, although I have used vba code for a macro that met my needs. I have a parts list for a PCB that has many different parts. Some of the parts are used multiple times across different reference designations("Reference" column in the file). I have shown a desired format and the original format below. Since the item number has blanks across the reference designators I haven't found a solution that would work for me.
Desired output:
Item
Quantity
[Code]....
View 9 Replies
View Related
Dec 2, 2011
When you use a formula like intercept. It wants its ranges in 2 columns. for example, intercept(A1:A5,B1:B5).
How can I get intercept to work using the ranges in 1 row. for example, intercept(A1:D1,E1:H1).
I want to do many intercepts in a large data range and still filter by some other variables that go along with these intercepts.
View 2 Replies
View Related
Sep 26, 2006
I'm using Conditional Formatting for an entire column to check the value of each cell and compare it to the value of a cell in the same row but a different column. (Cell Value equals =$D2) It works great until I insert or delete a cell in the formatted column. The reference does not change as one would expect. I've played around with formulae such as =$D2<>$P2 but the reference only changes for the P2, not the D2. I've also tried using =CELL("contents", ADDRESS(Row(),4)) but this causes excel to complain.
View 3 Replies
View Related
Oct 16, 2013
In Column A, starting in row 8, I have a list of part nos. This list can be any number of rows long.
Further down the sheet, I want to put that same list into a horizontal array. I currently have this formula in the first column. It will, of course, pull the value from the 1st row.
=IF(ISBLANK(A8),"",A8)
However, when I fill across all of my columns, it changes the Cell reference to B8, C8, etc. whereas I need it to change to A9, A10, etc.
Writing a formula that will index the ROW reference as I fill across?
View 3 Replies
View Related
Nov 2, 2007
I'll admit I know very little about creating a macro in Excel so I hope someone can help me out with creating what I consider a fairly simple macro to adjust values in a column or columns.
What I am using this worksheet for is a merchandise database that contains 3 columns of pricing values, ie. Column headers Small, Medium, Large.
The columns are approximately 2000 rows deep.
I need to change the pricing values in all 3 of these columns by a specific amount. However there are some values in the "Large" column that will not be adjusted. Those values not adjusted will be based on the contents of another cell in the same row that would only contain the data "OT,JB" or only "JB".
I've considered using find/replace but think it would be very inefficient.
Right now I am looking to lower the price values by 2 dollars. All values are numerical and formatted as Number/General. ie, 11.95, 7.95
I've considered creating another column or linked worksheet and forumla-ize it and then copy/paste my value results back, but I am hoping for something less cumbersome, something that is expandable as the worksheet grows, etc. I think a macro, but I do not have any idea what to do or how to get started.
View 14 Replies
View Related
Nov 17, 2012
1. Is there a faster way to adjust the size of the columns? I had to use my mouse to stretch the column out. This can be quiet time consuming if there are 8 columns needing to adjust to the same size. ie Col A, B,I, J needs to be the same size.
2. Can Excel determine the best size for the column? Say I need a column with data saying "yes" and "no" and a column for the letter "X" only or do I have to stretch the width of the column myself?
View 1 Replies
View Related