Increment Formula By 1 In Successive Worksheets?
Dec 24, 2012
I have a workbook with 70+ worksheets that pulls data from a single input sheet and I need to increment the cell references in each worksheet by 1. Is there a way to do that without having to manually open each worksheet and change the cell reference.
VB:
'Row 27 on worksheet 1 cell B27' =+Input!$D3
'Row 27 on worksheet 2 cell B27' =+Input!$D4
'Row 27 on worksheet 3 cell B27' =+Input!$D5
Thru worksheet 70
'Row 27 on worksheet 70 cell B27' =+Input!$D72
View 5 Replies
ADVERTISEMENT
Aug 24, 2009
Currently for the first line on the sheet I'm working with, I have the following:
=INDEX(SALESMEN!$D$2:$D$500,MATCH(TRUE,SALESMEN!$H$2:$H$500<>"X",0))
which is completed with CTRL+SHIFT+ENTER, and it works properly. However, I want to do the same for all lines following, where it will go to the next item matching that value. For instance: on my SALESMEN sheet, I have John Smith, Fred Johnson, and Mary Williams. Fred Johnson is considered inactive, which is represented in the SALESMEN sheet as an "X" in column H. Therefore, I want line 1 to show John Smith, and line 2 to show Mary Williams.
View 9 Replies
View Related
Sep 29, 2005
How do you get a value within a cell to increment, by say, 1, for each and
every worksheet within my workbook?
For example, the value in sheet1 in cell A1 is 100
in sheet2, I input...= 1 + 'sheet1'!A1 in cell A1 (value now is 101)
then, in sheet 3, I input...= 1 + 'sheet2'!A1 in cell A1 (value now is 102)
then, in sheet 4, I input...= 1 + 'sheet3'!A1 in cell A1 (value now is 103)
etc.,etc.,etc.
How can I input a formula...then copy and paste it into my sheets without
having to go to each and every worksheet to input the formula?
View 9 Replies
View Related
Oct 30, 2006
how to retain the values of variables even after closing the workbook...Ref:have created workbook and renamed sheets as Day1,Day2,..,DayN..as and whn new worksheet is created.after saving and closing this application, next time when we open the application and create new worksheet it should create DayN+1.
View 9 Replies
View Related
Jan 10, 2014
Solve the following error: Run-time error '1004': Method 'Evaluation' of object '_Global' failed
My VBA code:
Sub Difference()
For i = 1 To 23
Sheets("Sheet" & i).Select
[Code].....
View 9 Replies
View Related
Feb 4, 2014
I am trying to build a user-friendly Excel database that takes the user's input from various cells and logs that data input by the user in successive rows to the side. Please see the screenshots of my current spreadsheet below:
Compressor Database.jpg
From the screenshot above, I would like for the user to input their data for the Date of Last Inspection, Current Hours, and check the boxes for any services they performed in the orange/pink "Input" box on the left. Currently I have the spreadsheet set up so that the orange/pink "input" areas recognize data put in to the yellow "Data Log" cells to the right. I am trying to get the yellow "Data Log" cell area to store the Date and Hours data put in by the user in successive rows like a database, but I am not sure how to do this. I was thinking of putting a button in the says "Log Data" which would, when clicked, store the data in the "Data Log" cells. I am unsure if I need to use a Macro or whether Excel has a simple, built-in function that can be used. Eventually I have plans for the "Date of Last _______ Change" Gray boxes, but would like to take this one step at a time.
I am not well versed in VBA and Excel Macros, and I am currently using Microsoft Excel 2007 (yes, I know it is old). I do have C# and Matlab coding experience, however I would like to do this in Excel to make it easier for the User as it is a well known program.
View 14 Replies
View Related
Nov 9, 2012
I'm looking for a formula to find the minimum value in a non successive range of numbers (excluding zero values).
My sheet contains four fields of numbers (#1, #2, #3 and #4) and than start over again with number #1, #2, #3 and #4 etc. This goes on for approx. 25 4-column blocks. A simple MIN-formula or SMALL-formula doesn't seem to do the trick as it takes all values into account, not just the #1 or #2 or #3 or #4 values.
Example (cells A1..A24):
999-999-999-999-110-120-130-140-111-121-131-141-112-122-132-142-0-0-0-0-113-123-133-143
The minimum value of #1 (excluding the zero's) would be 110, the minimum value of #2 would be 120, #3 would be 130 and #4 would be 140.
View 4 Replies
View Related
Sep 15, 2008
I have a formula that I'd like to have increment by one, but I can't figure out how to do it.
Here's the formula:
=IF(INDIRECT("'Supervisor'!B"&ROW()-4)="Y",E12-D12,IF(INDIRECT("'Supervisor'!B"&ROW()-4)="N","0",IF(INDIRECT('"Supervisor'!B&ROW()-4)="","0")))
I'd like to have the -4 in the equation increment to -5 when I paste it to the next row without having to fix each one of them.
View 14 Replies
View Related
Aug 7, 2012
How to increment a formula with an If statement that transforms 2 values in time format and then as long as these two values keep beeing added in the cells the formula keeps active in the column.
I tried to apply the code for all the but this makes my file huge like 20MB!
You can check this on the file, go the "records" sheet, add the time in the "shift start" and "shift end" fields, then the difference value goes to "hours" in the sheet.
[URL] .....
View 4 Replies
View Related
Sep 30, 2009
I've created a single worksheet that is essentially a "dashboard" type of report that displays data for a single employee/person. This worksheet (let's assume it's my "template") contains formulae that is driven by a single lookup cell (in this case, the employee's ID, in cell, for example, A1).
This "dashboard" report (for just one individual) needs to be duplicated for the entire employee population (let's say ~100 people); this employee population is stored as a list in a separate worksheet, in a single column.
Is there a vba solution that will copy my template and populate the cell A1 (of each duplicated template worksheet) with the the employee IDs - of course, it would be ideal if the solution can search in my employee ID list and continue down until there are no more IDs and create the same number of worksheets as there are IDs?
Because the macro is creating numerous worksheets, is it possible to name the worksheets based off of an adjacent value (in the same sheet as the IDs) to each respective ID (I'm thinking of a concatenation of the employees' IDs and names)?
One major wrinkle in this process: the above process would be ideal if the "template" worksheet won't change (i.e. no changes to formatting, no additional data elements, etc.) However, it's likely that the client will want to add/remove/change items/elements to the "template" dashboard. Assuming, at this point, all 100 worksheets for each individual/employee have been created, it would be a huge pain to manually add/remove elements from each sheet. Is there another macro that would delete ALL employee sheets? That way, I can re-modify my single template and just run the original macro to re-create my duplicate sheets (but populated with different IDs) again.
View 9 Replies
View Related
Mar 5, 2009
I have a sheet which needs to look up one reference and then fill a table with the rest of them.
EG:
Cell A1 contains '0091 911'!$E$2 (cell E2 contains value 100)
Cell A2 contains =indirect(A1) and displays value 100
I need a formula which will auto fill the remaining cells in the table.
eg:
Cell A3 fills to contain '0091 911'!$E$3 (row +1)
Cell B2 fills to contain '0091 911'!$F$2 (column +1)
so it needs to fill the Indirect reference and not =indirect(A1),=indirect(A2)....
View 14 Replies
View Related
Jun 21, 2014
Have table with five columns and five rows. The columns(C4:H4) hold Systems, Systems is a defined range, and rows (B5:B9) hold staffer names, Staffer is a defined range. Cell A5 holds period, by quarters, ie, Q1-Q4.
At present am using =COUNTIFS(Staffer,$B$5,System,C4,Q,$A$5). This works fine but as you can see I must change the Staffer starting reference $B$5, with each new row.
formula that changes column and row automatically as I drag down and across.
View 6 Replies
View Related
Jul 22, 2006
I am needing a macro to modify a cell reference contained in a formula. For example: I have "=B2" in a cell of my worksheet, and I need some code to select and increment that by 1 so it becomes "=B3". I know how to use the ActiveCell.Offset command, as shown below, to select a specific cell so that it can then be modified, but I can't figure out how to make the actual change. ActiveCell.Offset(rowOffset:=0, columnOffset:=-1).Select
View 3 Replies
View Related
Aug 31, 2006
If I type the formula below into cell A1 and then drag it to cell A2 it correctly changes $A6 to $A7
CELL A1 =Planner!$A6*(BS8/20)
CELL A2 =Planner!$A7*(BS9/20)
I would like it to change $A6 to $A14 and then to $A22 as below. In other words adding 8 to the reference each time I drag it down.
CELL A1 =Planner!$A6*(BS8/20)
CELL A2 =Planner!$A14*(BS9/20)
CELL A3 =Planner!$A22*(BS10/20)
CELL A4 ==Planner!$A30*(BS11/20)
View 9 Replies
View Related
Jan 17, 2008
I'm using a macro to update individual formulas in a sheet that contains data from external documents. (i.e. ='C:September[Book2.xls]Sheet1'!$AZ$1 + 'C:September[Book3.xls]Sheet1'!$BA$1 ) Every quarter I have to change the column references in this formula (i.e. $AZ$ will become $BD$ and $BA$ will become $BE$ and so on). Also I have to change the September reference to December etc (but I've mastered this already). My current code works well, but requires manual updating:
Dim ColumnReference1
ColumnReference1 = "BD"
Dim ColumnReference2
ColumnReference2 = "BE"
Worksheets("Sheet1").Range("H48").Formula = "='C:September[Book2.xls]Sheet1'!$" & ColumnReference1 & "$1 + 'C:September[Book3.xls]Sheet1'!$" & ColumnReference2 & "$1"
My problem with this method is that I need to automate the updating of ColumnReference1 = "BD" to ColumnReference1 = "BH" to ColumnReference1 = "BL" and so on and so forth. It's handy that the reference shifts across 5 columns, which remains constant. Ideally, I'd like to tell the macro to look at "AZ" then add 5 columns.
View 9 Replies
View Related
Jan 18, 2008
I'm trying to write a formula that will keep the Column ID static while allowing the Row ID to be reference. Each week my worksheet adds one line and the formula in question is moved one cell to the right and thus the formula cell makes the same move (1, -1). I need the formula to keep the column the same from week to week, while allowing the row to shift downward with the formula. I've attached a sample spreadsheet with the formula I derived. Check out the highlighted formula to familiarize yourself before running.
View 2 Replies
View Related
Jun 1, 2008
I am trying to link cells between two worksheets and am having some difficulty. For instance, in E17, I want the cell to reference cell H41 on sheet 2 and for F17 I want it to reference H42 on sheet 2, etc. However, using the formula =Sheet2!H41 when I cut and paste the formula it changes it to =Sheet2!I41 (ie it changes the column and keeps the row constant). I want to find a way to fill a large amount of cells this way and would prefer to not have to manually change each cell individually. I assume I would use the indirect( and the column( commands but can't seem to figure that one out.
View 2 Replies
View Related
Mar 29, 2014
I have items in a column like below:
Line (A1) asdfasdf
Line (A2) adsfadsf
Line (A3) asdfasdf
What I would like to be able to do is highlight the three columns and fill down, but I would like for it to increment and paste the next three lines filled like this:
Line (A2) asdfasdf
Line (A3) adsfadsf
Line (A4) asdfasdf
Then below that the next three lines filled like this:
Line (A3) asdfasdf
Line (A4) adsfadsf
Line (A5) asdfasdf
The (A1, A2, etc.) are cell ranges and already contain the concatenate function that pulls data from a different location. The problem I am having is when I
highlight and fill down, it doesn't increment the cell by +1 (Ex. A1 beomes A2) but instead by +3 (A1 becomes A4) the number of lines highlighted.
View 8 Replies
View Related
Apr 8, 2014
I am trying linking it and this what I am trying to do , need a formula for it.
E.g.
Sheet 1 cell J3= Sheet 2 cell K3
Sheet 1 cell J4= Sheet 2 cell K9
Sheet 1 cell J5= Sheet 2 cell K15
and so on.
View 3 Replies
View Related
Apr 27, 2014
I am creating a training document for work; the sheet I'm creating is a summary sheet which works out how many people answered questions correctly, incorrectly (bringing in from another sheet), number of questions answered and percentage of correct answers.
Looks like:
Correct: =COUNTIF(sheet1!E2:E36,"correct")
Incorrect: =COUNTIF(sheet1!E2:E36,"incorrect")
Number of questions answered: =SUM(C4+C5) (correct+incorrect)
Percentage right: =SUM(C4/C6) (correct/number answered)
I need to drag these 4 formulas down into another 400+rows, however in the correct and incorrect formulas I need it to keep the 2:36 but change the e to f, g, h, etc.
View 14 Replies
View Related
Feb 26, 2014
I'm having to copy formula on a tabulation sheet that compiles information from other worksheets, and I need to change the formulas in each row to refer to the successive worksheets. Right now I don't know any other way than changing the formula in each cell, and this is taking way too long.
Example:
One cell's formula: =COUNTIF('5'!$F$21:$T$50,TABULATION!C$5) In the next row down, I need it be: =COUNTIF('6'!$F$21:$T$50,TABULATION!C$5), then =COUNTIF('7'!$F$21:$T$50,TABULATION!C$5), and so on.
[URL]
View 4 Replies
View Related
Nov 29, 2012
[URL]
I have data in worksheets that make up the 52 weeks of the year. Each sheet is numbered like this "WK1" "WK2" and so on... up to "WK52"
Each sheet is setup exactly the same so all cells are the same.
So I have a summary sheet that structures the data from all the week sheets to plot to graph all within the same file.
Thing is when I link the first cell to the first sheet say WK1 and then try to drag the formula down to the worksheet number does not increment
Tried the code in the beginning of this post and it displays the worksheet and cell number in the cell cant get the actual data to be displayed.
When I drag this formula down I want it to index the worksheet number
=WK44!$AG$14
Like this
=WK44!$AG$14
=WK45!$AG$14
=WK46!$AG$14
This is what I get in the cell when I use the formula given in the post
WK01! $AG$14
View 4 Replies
View Related
Mar 1, 2014
I am working on a model for a school project. Time is in ColA, the number of events is in ColB.
Each event requires one person to work before and after the event. For example, if we assume that I need one person 30 min before the event, one during the event and one 15 min after the event - ColC shows the number of staff required. I would need a formula to calculate ColC. Basically I want excel to add the values of the rows above and below a value if it is within a specified time range
It gets a little bit more complicated unfortunately, the time requirements need to be dynamic - so one day it is 30 min before the event, but another day it could only be 15 min before but 30 min after the event etc.
I was trying to do this with a SUMIF formulas, but couldn't get it to work.
Col A
Col B
Col C
7:00:00 AM
0
1
[Code] .........
View 3 Replies
View Related
Mar 16, 2009
to copying a formula from one column to the next adjacent column and also incrementing the 2 numeric values inside the formula. Please see attached sample.
One value increments with each new column whereas the other increments with each new row. Please see attached sample.
And in the last row there is the average formula which must copy the new column and average the new column.
I tried to create a Macro in attached but it did not work with formulas.
View 8 Replies
View Related
Aug 24, 2007
I am trying to increment a row when i copy it across columns. I have searched for a couple hours on how to do this, but I have not come up with a solution that I can understand that works for my situation.
I found this page, but I guess I am too novice to comprehend it. [url]
I would like the number in this formula to increment when i copy it to the adjacent column.
This formula is in B178.
=IF(B8="x",A8,"")
So in C178 I want it to be
=IF(B9="x",A9,"")
View 5 Replies
View Related
Dec 3, 2007
COPYING indirect formula. When I copy, the lookup reference does not change. My formula is =INDIRECT("'"&$A247&"'!j106"). When I copy horizontally across cells, I want J106 to increase, ie j107, j108 etc. At the moment it remains at J106 and i have to manually increase the numbers by 1.
How do I change my formula so that the numbers increase automatically?
View 6 Replies
View Related
Jan 15, 2008
I have a spreadsheet containing quite a few lookups etc. I am trying to copy a cell across about 10 columns. This has to be done for about 50 different rows on about 20 different sheets, so I am looking for an alteration to the formula to help me rather than typing in the formula over and over;
='Basic Labour'!AD6*Rates!$E$526
Say this is in AD6, then in AE6 I would require
='Basic Labour'!AE6*Rates!$E$527
and so on across the region to be autofilled...
(It is multiplying the same cell in a different sheet against the 'next row down' in a rates lookup sheet).
View 4 Replies
View Related
Oct 11, 2011
Make a loop where I can increment the row number and execute the command where I set the formula?
View 1 Replies
View Related
Sep 22, 2007
As per this screenshot,
I am trying to work out a method which will allow me to drag the forumula which is in cell B13 from B13:B17, and have in increase the date serial number by one for each row by which it descends.
In other words I want to drag the formula down to, say B14, and have it increase the date serial to = that which is in cell A14.
[the obvious benefit of being able to do this is that I don't have to manually adjust the date serial in each cell on each new row]
View 9 Replies
View Related
May 26, 2008
In my data validation I have the following formula as the Source: =INDIRECT(SUBSTITUTE($F$2," ","_")). I want to be able to copy the cell and paste it into another cell and have the formula update to reference the new cell. Currently the validation is for cell G2 and references F2. I want to be able to copy G2 and paste it in G3-G6 having the formula update so it refrences F3-F6.
View 3 Replies
View Related