Changing Value In One Sheet Based On Value In Another?
Apr 22, 2013
A workbook that has a main sheet, and a few other sheets that main data is copied to. The main sheet is a complete list of work, the other sheets are split down to each machine we use here, to keep track of machine capacity.
What I want Excel to do:
Each works order has a number of hours attached to it (Which is manually entered on each sheet). Once a week a button will be clicked and the VB code needs to look at the different machine sheets, and do some kind of lookup between the works order number on the main sheet. If it says "Complete" in column H on the main sheet then it needs to put the number of hours to zero on the machine's sheet.
In my sheet called summary I have the names of the rest of the tabs in the book in cells B5 to B34. We want to be able to change the names of the tabs by changing their respective cell on the summary tab. So “sheet1” corresponds to B5, “sheet2” to B6, “sheet3” to B7, etc.. So if I change the name in B5 to say “APPLE” I want the tab for sheet1 to change to APPLE. When I change B10 from “sheet6” to “Lemon” I want sheet6 to be titled “Lemon”.
I want to write a For loop so that it checks the range G2:R2 of Sheet1 for the first non-zero cell in that range. When it comes to the first non-zero cell, it will change the formula of A2 on Sheet2 to have the SUM of that non-zero cell and the next two cells to the right. Example:
I'm trying to figure out a way to lookup a value based on a conditional sheet name. I'm finding it difficult to explain in words what I'm trying to do, so I'm going to try and describe it in a miniature example of my spreadsheet. I apologize if this is going against forum rules, this seems like the quickest way to get my question across:
The following is the way my spreadsheet's first page is set up:
ID Apr-08 Mar-08 Feb-08 1 2 3
The column labels depend on another table, which changes monthly. The rest of the sheets (24 of them, labled "200804", "200803", etc) look like this:
ID $ amount Date paid 1 2 3
I have another table upon which the na
I'm trying to return the "Date Paid" value for each ID for each month. Each month, however, more data arrives, and the labels change. I have several dozen spreadsheets formatted in this way, and I'm trying to avoid having to change the vlookup (or other formula) manually each month for each sheet. Is there a way to make the vlookup depend on a table?
This is essentially what my formula looks like right now for cell A2: =VLOOKUP($A2,'200804'!$A$1:$G$10000, 3, FALSE)
If I could replace '200804' with a cell reference, that would be ideal. I haven't been able to figure out how (if possible); I tried experimenting with index sheets but that went nowhere.
This may have been answered on here but can not seem to find it. My situation is I have values in A1,A2 & A3 that are like counter reading so the value is always changing. What I am looking to do is change the cell color if one of the values is over 500 from the other two values. Say A1 is 3000, A2 is 3250 and A3 is 3500. I would like the cell for A3 to change color.
I am working on a workbook with 200+ sheets and an index linking to each of the sheets. On the sheets there is a cell containing the results of calculations and I need the cell referencing the sheet in the index to change background colors depending if the calculations value is greater or less than 0. I currently have working code that also changes the tab color of each sheet depending on the value, but i am trying to add the index cell background change functionality into that. also, the index listings is subject to change. my working code is
Private Sub Worksheet_Change(ByVal Target As Range) If Range("d34").Value < 0 Then Me.Tab.ColorIndex = 3 ElseIf Range("D34").Value > 0 Then Me.Tab.ColorIndex = 4 Else
and the code i am trying to get working is
Private Sub Worksheet_Change(ByVal Target As Range) Dim rngX As Range Set myRange = Worksheets("Index").Range("A1:A500").Find(Range("C2").Text, lookat:=xlPart) ' the C2 is the reference the title that would be on the index If Range("d40").Value < 0 Then
I keep getting the runtime error '1004: application-defined error or object-defined error the thing is, i ran the cell background changing code in a normal macro before integrating it in my other worksheet code first and it worked fine. I have a little code experience, though not much in vba and I am unsure what the issue is. if there is another better way to accomplish what I'm tring to do, that would also be fine.
I have been working on a workbook that uses as a source information on Sheet 1.
Each item reports a number of different details from column A to column BY.
Each row is for a different item.
25 rows of information.
This is my master formula sheet, the one I've been using to create the page that reports and formulates information on a single item. The source for this sheet is taken from the cells in Sheet1!Row2.
Now that I have the sheet pretty much finished, I want to paste the same report on each succeeding page for a total of 25 sheets. I can copy Sheet2 and paste into each successive sheet, but then I need to change every single formula so that where it said AT2 it changes to AT3, where it was H2, H3, etc., from A to BY.
Problem: Can I use something that will automatically take the information for succeeding sheets and take as its source the succeeding row from the source page?
I don't know that I'm describing that sufficiently, so:
Sheet 3 would take as its source Sheet1, row 3. Sheet 4 would take as its source Sheet1, row 4. Sheet 5 would take as its source Sheet1, row 5. Sheet 6 would take as its source Sheet1, row 6.
In the past I used the find/replace function, but this sheet seems way too complicated for that. As an example, one cell alone on my master sheet is
so I would need to change S2 to S3 everywhere it appears, but there are probably more than a hundred places on the sheet that I'd have to manually change 2s to 3s, etc., for 25 sheets, which is why I'm wondering if there isn't a better way than going cell by cell, sheet by sheet.
I have a workbook with multiple sheets. Each sheet has a title (just words in a cell). Is there VBA formula that will have the sheet take the name of the title and also chnage when the title name changes?
I have been searching for a way to prevent a user from changing a worksheet name. I ran into some code from the post below (see link) but I find that the code lets the user change the name and save the changed name of a sheet; only when the user selects a different sheet does it change the name back to the set name (sname) from the code.
I'm sure there must be a way to make this happen without deactivating the sheet, but I can't figure it out. Is there some other sort of event that could cause this to happen.
Is it possible to make a worksheet smaller. What I want to do is to be able to tab from, a1 to b1 to c1 to d1 etc up to g1 and then if I tab again it goes to a2. Is this possible? Is there any way of making it skip the a coloumn when tabbing even if it has data in it?
My goal is to have changes done to one sheet reflect on to another to make things much more easy to do. Below is a picture of what I am dealing with. ( I covered some personal information)
pic of excel.jpg I want to be able to plug in something or delete it and have it reflect to all other sheets. Also I would like to be able to plug in some information and have it export itself based on a specific information. For example, I would want all Newark,NJ contacts to be place in the Newark list automatically.
I want to capture data from another workbook each month where the sheet name that I need the data from changes each month. i.e. 0810, 0811, 0812, 0901. Are possible sheet names. I've tried to build this unsuccessfully into the my -
I have a worksheet called "Roster" with a list of names from D7:D17 each person on the list has a separate sheet that is called by their name. the sheets are not linked up. the names were just manually typed into the list and into each sheet name.
If any name is changed on the list on "Roster!D7:D17" i would like the sheet that has that name to change as well.
This is the code that i was sent, but i do not know enough about VBA code to understand exactly what is happening, thus i cannot diagnose the problem. I placed the following code into the page "Roster" (by right-clicking and then pasting the code) then i closed, but nothing happens. I can mess with the code and get an error message. but that is about it. error messages usually say something about the debugger, or runtime error or something.
there is the Private Sub Worksheet_SelectionChange(ByVal Target As Range) OldVal(0) = OldVal(1) OldVal(1) = Target(1).Value End Sub
How to have VBA return the value of the following month in mm format (i.e. 08 for August, not 8), based on today's date. As such, today it being the 7th month, I wish to return the value 08 (the 8th month).
I need the URL of
To essentailly be
but the way in which I have posted it above does not work!
Also, I need to define it such that as the month in question (in this example 08) will rename the subsequent part of the URL (here, August). So for example, next month (August), the URL should automatically become
I am trying to create a formula that references information on two different sheets, but i want it to show me the values that are newly created when a new row is inserted. The two current sheets are Master and Data.
I have a formula on Master that reads ='Data'!$K$3 to reference the value on Sheet data in cell K3. When a new row is inserted showing me the current readings, I want the Master sheet to show me the NEW value in cell K3 on the data sheet. The problem is, the insert of a row moves the formula on the Master sheet to now be ='Data'!$K$4. How can i STOP the insertion of a row from changing the formula so i continue to see the value i need?
I have a excel worksheet which i am exporting into a word document through a macro labeled "Go". Basically it will query the excel sheet and the word document i have, will take the values and put them in the correct placing.
My problem is...
I know that excel will use the first row as the table headers, but what if i want it to start at like row c? and use that row as table headers. How would i go about doing that?
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.
I have worksheets named 1 to 100. In a different worksheet "Summary" I have a summary of data of those worksheets. I want to change the worksheet number automatically in a row by dragging. For example, in worksheet "Summary" ....
Quick question, I know how to change a cells background / text color based on it's own value using conditional formatting but what would be the formula to change cell A1's background color based on the value of cell C1?
Is it possible to select a cell on any given row and the value of a cell on that row for example C5 & C6 are shown in cells A1 and B1 respectively? So if the user moved down the sheet selecting different rows the data would change?
I'm trying to change the colour of a row based on the value in a cell (in a column) and am wondering how I can do that. Conditional formatting doesn't allow enough colours unfortunatly. Ive googled it and can only get a cell colour to change not a row colour.
To give an explanation:
Sheet 1: Rows 5 - 100 colour to change based on Sheet 2 Column K5-100. Column K5-K100 will have values between 0 and 10.
I have a quarterly report that measures the safety performance of the plants in our company using bar charts. One set of 4 charts for the company as a whole and four additional sets of four for each of our divisions for a total of 20 charts.
I would like to change the color of the bars based on whether the location has met (bars colored green) or failed to meet (bars colored red) the goal for that criteria. The company average will be a yellow bar. Of course it can be done manually but that is really slow and tedious.
Is there a way, using VBA or a macro, to change the color of a bar (data point) based on the value of that data point? Can it run through all of the data points in each chart and make those changes based on criteria that I can set for each type of chart?
I am trying to automate a graph for data that is not always the same amount but always in the same format. I have attached a spreadsheet that has an example of the data.
Columns B, D, & E are the ones that I am interested in charting in a line with markers type graph, but the rows may be 100 for one set of data and 1000 rows for another set of data. I am trying to get the macro to open a new worksheet and as part of the macro create a userform that will ask for the text information on the top of the worksheet (as this is not always correct when imported).