Changing Previous Threads To SOLVED
Dec 10, 2008I am having problems changing my previous threads to SOLVED.
View 2 RepliesI am having problems changing my previous threads to SOLVED.
View 2 RepliesI have a list of text values in column X. I need to come up with a formula in column Y.
X
Y (RESULTS OF REQUIRED FORMULA)
Comment
1
HAT
1
First HAT in column
2
[Code]....
I can't play about with the natural order of the spreadsheet, so there's no chance I can re-sort the data into column X and (easily) identify the duplicates that way. So, it could be that the duplicated value(s) will appear in any cell within that column.
I need to identify whether the item is a duplicate in the unsorted list. Ideally, the first entry of a set of duplicates will be given 1, then the subsequent duplicates themselves given a 0 (zero). It's to subsequently do some counts on.
I guess that as long as the one of the entries in the duplicates is marked with a 1, while the others are 0 (zero), that's all that's important.
I have a excel based timesheet that looks at an external table named "Station Master" to populate columns from a vlookup. I have recently linked the Station Master to a database to populate it. From the database we may change status so that the project does not show up in the station master anymore to make sure complete projects are not getting hours charged anymore. Now if a project that was on the master goes away previous timesheets lose the correct description because it is not on the station master anymore.
My question is there anyway to make the previous data lock so the data that is in the cells won't change when the station master changes.
A little more info... the time sheets are by quarter so 12 weeks are in the same workbook as individual worksheets. All of those worksheets vlookup to a worksheet called "projects" inside the workbook. Then that worksheet references the external Station Master workbook.
I want the order size to be colored red. If the most recent order is larger than the previous order, I want the order size to be colored blue. If the most recent order is the exact same size as the previous order, I want the order to be colored black.
How would I make code that would let me "remember" the previous order size and the most recent order size, and let me compare them to conditionally format the font?
Been getting into Excel recently for my job and have been learning things at a quickened pace, which is nice. However, I have ran into the same problem everyone else has, at one point in their Excel career, run into. I need to sort merged cells.
I am sure you are thinking "Unsort" or "do you really need to merge them?" Well when dealing with nearly 300 names, the amount of sorting become monotonous. I am sure this will not be the first time (it's actually the second) I will need a macro like this.
The current set up is:
4 merged > 2 merged twice > 4 single
If you need additional information on the format let me know, but I am looking specifically at the 4 merged into what I'll be sorting.
location solved? issue employee room 1 ok issue 1 employee 1 room 2 issue 2 employee 2 room 3 issue 3 employee 2 room 4 ok issue 4 employee 1 room 5 ok issue 5 employee 1 room 6 issue 6 employee 1 room 7 ok issue 7 employee 2 unsolved issues room 1= solved issues room 1= unsolved issues employee 1= solved issues employee 1=
what formula could I use to calculate the solved/unsolved issues assigned to a room or to an employee? I use an autofilter on this date, so that I can only show unsolved issues.
Is there any way someone can put the option of "SOLVED" on the post reply when you are the orginal poster.
Now you have to reply to the post then go back into your orginal post to mark it solved. they would be more willing to mark the thread solved. I have noticed many people get an answer and never respond or mark solved.
see attached file. Need to find latest non blank value - in attached file it is highlighted in yellow. From there, want to summarise 26 weeks back so, in the attached file:
Row 2 would be finding 750 and summarised back 26 weeks from 30 sep 2012
Row 3 would be finding 2250 and summarised back 26 weeks from 2 dec 2012
Row 4 would be finding 5000 and summarised back 26 weeks from 4 nov 2012
I have code that inserts columns, inserts formulas, and then copies the formulas to the last row of data. It all works good but for some reason, the columns that are being copied, are being copied past the last row of data. It can always be determined how far down it will be copied. Examples: if the last row of data was row 4, then the formulas would be copied down to row 24, if the last row of data was row 54, then the formulas would be copied down to 254, if the last row of data was row 284, then the formulas would be copied down to 2284. I can not figure out how and wh this is happening, but whatever the last row of actual data is on the spreadsheet, there is a 2 being placed in front of the last row of data and the formulas are being copied down to whatever the last row is with the addition of a 2 in front.
Here is the code for the columns additions, and formulas:
Columns("O:S").Insert Shift:=xlToRight
Columns("W:Z").Insert Shift:=xlToRight
Columns("AB:AF").Insert Shift:=xlToRight
Columns("AH:Al").Insert Shift:=xlToRight
Range("O2").FormulaR1C1 = "=CONCATENATE(RC[1],""/"",RC[2],""/"",RC[3])"
Range("P2").FormulaR1C1 = "=IF((RC[3]=7),LEFT(RC[-2],1),LEFT(RC[-2],2))"
Range("Q2").FormulaR1C1 = "=IF((RC[2]=7),MID(RC[-3],2,2),MID(RC[-3],3,2))"
Range("R2").FormulaR1C1 = "=RIGHT(RC[-4],4)"
Lets take this first one for example:
Range("O2:S2").Copy Range("O2:S2", Range("O2:S2" & Range("A" & Rows.Count).End(xlUp).Row))
If the last row of data was row 54, then columns O:S would have the formulas copied down to row 254.
How can this code be modified so the formulas will not be copied past the last row of data?
How do you get the code boxes to appear in these threads. I do not know how to do this. As you can see, all I did was copy and paste my code in this thread.
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.
View 2 Replies View RelatedMoving between different sheets changes the procedure window, which is a good thing, but can also can be error prone and annoying to search through several windows searching for the procedure or module currently working on. Is there a setting somewhere to prevent VBE from changing the current procedure window?
View 4 Replies View Relatedi use a worksheet.change() sub in the vba of the worksheet itself, not a new module.
I want to check that when a certain value is deleted, the user really wants to do this (and attach a routine to this to delete the entire row, shift etc). so far piece of cake, but where the .... can i find the previous value of the cell in case the user decides he made a mistake. the standard VBA sub creates a target as range, but there doesn't seem to be a target.value.previous, or something to that effect, or for that matter something like a worksheet.beforechange() sub
how to find and restore a value which has been deleted in excel in the worksheet using VBA?
is there a way for a udf to return the cell's original value instead of an error.
ie. the UDF in the cell returned a value from a database. now if i move the database and reopen this sheet, excel will try to recalculate and if it doesn't find the database it will return an error. instead of that i just want excel to return whatever was in the cell, before it had to be recalculated.
I have an excel document which I am trying to automate using VBA. I have two headings which have the same text every month but the month value must change.
Basically I’m looking for the last day of the previous month. So if it was 05th April 2007 I want to return 28 March 2007. I just need to obtain the last day of the previous month in the following format ’28 March 2007’.
I need to paste Entire row in one sheet( Sheet1) to the previous row in other sheet(Sheet2) ex: If i copy 3rd row from one sheet(sheet1) than it must be copied to 2nd row in other sheet(sheet2)
Sub try()
Sheets("Sheet1").Select
Range("b2").EntireRow.Copy
Sheets("Sheet2").Select
Range("b2").EntireRow.Previous.Select
ActiveSheet.Paste
End Sub
I have built a compiled a workbook which figures out the daily business in my club, Staff Rota, business done, wage slips, and everything else I need. Well, everything except the stock element.
I need the current week to look up the previous weeks stock levels on each item, when the previous weeks workbook changes it's name every week. At present I name the sheets by the week ending date, i.e. 12-04-14.
I have a data table with dates and marks by 0 and 1.
I need a formula, if a date selected from data table, to find first next or previous matched date.
At attached table you can see all detail and explanation.
match dates.xlsx‎
I've got a workbook that increments in sheets for each new week. I have a cell showing the current week number for that sheet ( lets say cell C1) and any formulas that need to reference data from the previous sheet do in 'indirect' function which basically looks at the current week number ( lets say week 20)in cell C1 and minus's 1 to navigate to the previous week (week 19).
I was wondering if there was a way to reference the previous sheet purely by the order they're in.
So say i have 5 sheets named "1,4,5,8,9" and these represent week numbers so the sheet named '8' in cell C1 would have '8' standanding for the week number but cells that wanted to reference the previous sheet couldn't do the 'indirect' C1-1 as there is no 'week 7'.
The weeks used could vary alot so a formula to reference the directly previous sheet is needed.
ok, thought best if i show you the actual formula
=IF(ISBLANK(C12),"",IF(ISERROR(VLOOKUP(C12,INDIRECT("'"&($AG$2-1)&"'!$C:$AG"),28,FALSE)),G12,SUM(G12,VLOOKUP(C12,INDIRECT("'"&($AG$2-1)&"'!$C:$AG"),28,FALSE))))
the '$A$G2-1' part is the bit that redirects to the previous sheet based on it's name, what i think i really need is to replace this part with a 'PrevSheet' function but i'm unsure how.
I want to move to the next row but i don't want to make another format just when i begin to write in the next row the format appear automatically like previous row ?
Note : format include formulas ,borders and colors every thing in previous row ...
If I erroneously saved over an excel document that is stored on an external drive, is there any way to restore the previous saved document, or am I screwed.
The thumb drive is plugged into a computer that gets backed up onto a network server, but I assume that the external thumb drive is not backed up with the c drive and r drive on the server.
Sheet summary2 has the table. And I am looking to compare and add the data (from all sheets Date 1 to Date31) . I am looking to add those values (yes as 1) in my summary 2 sheet for the range E3 to H14 ...if it mathces as MF8330 or x543 or c5045 or x940.
View 4 Replies View RelatedIn Excel VBA, is there a way to get the beginning date and the last date for the previous month from TODAY()?
i.e. If TODAY is Jan 3, 2014, then I would like to have the beginning date as Dec 1, 2013 and the end date as Dec 31, 2013.
i.e. If TODAY is Mar 18, 2012, then I would like to have the beginning date as Feb 1, 2012 and the end date as Feb 29, 2012 (yes 29, not 28).
So basically, I need to have the AI to know the beginning of the year (January 2014 - takes Dec 2013) and if it happens to be February, the 'end date' is either 28th or 29th depending on the year.
I have a report that is run everyday showing a list of orders, on separate tabs based on facility code, that has all kinds of information. I want to be able to take today's file, and have it lookup any comments I posted on the previous day's file.
I've been messing with code all morning and can't get it right. I think my problem is the vlookup part, and I don't think my loop is right either. Here's a little bit of the code i'm trying:
I've found on this newsgroup a function to get the previous sheet
name
Function PrevSheet()
On Error GoTo EndFunction
Application.Volatile True
PrevSheet = Application.Caller.Worksheet.Previous.Name
Exit Function
EndFunction:
With Application.Caller.Parent.Parent.Worksheets
PrevSheet = .Item(.Count).Name
End With
End Function
when i put =PrevSheet() i get the previous sheets name
What i want to be able to do is use this in place of directly
referencing the sheet name in my code as follows...
=IF(G4-J4<0,G4-J4,G4-J4)+'Week 1'!H4
So i want to be able to replace Week 1 with PrevSheet but i've tried
and falied on this. eg...
=IF(G4-J4<0,G4-J4,G4-J4)+PrevSheet()!H4
Could someone show me the correct syntax for this.
I would like to have a "PREVIOUS" navigation button in a workbook that goes back to the previously activated worksheet, which may or may not be physically the previous worksheet in the workbook. In other words, if I go from Sheet #1, to Sheet #3, to Sheet #5, I'd like to return to Sheet #3 from Sheet #5 (rather then navigating back to Sheet #4).
"Open VB editor and double click 'Thisworkbook' and paste this code in on the right:
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
lastsheet = Sh.Name
End Sub
Then right click 'ThisWorkbook' and insert module and paste this code in
Public lastsheet As String
Sub Select_Last()
Sheets(lastsheet).Select
End Sub
Whenever a user changes sheets, the name of the last sheet is now held in the variable 'Lastsheet' so if you assign a shortcut or button to the code then the last used sheet will be selected."
My problem is that when I want to assign the macro, I can't find macro name that looks anything like the above in the drop down list of Macro Names. how to assign the macro to a button?
Yesterday (13/03/2007) was the 9th working day of the month (basing a week on Mon – Fri) – today is the 10th working day
Is there any formula, or mix of formula’s I can use to automatically calculate this?
I have a month number in H2 (1-12). I want a formula that will give me the previous month number. So, if h2 = 1. I need my formula cell to equal 12.
With "edit directly in cell" turned off, if you double click through in a cell containing a formula to the cell being refferenced, is there a quick way of getting back to the original cell you clicked on?
View 9 Replies View RelatedI have a DDE-based worksheet, that is obtaining data from Townsend Analytics' RealTick Server software. One of my cells is a DDE formula that retrieves the current BID ask price, for a given stock.
When a new BID price comes in to my designated cell, I need to somehow capture the existing BID price, before this new one updates in the requisite cell. I want to be able to store this "old" value in another cell.
Unfortunately, there is no "pre-cell" event trapping. I've tried to work with the worksheet_change event, which passes an argument of the effected cells, but the cell value has already changed, by the time this event has been called.
This problem sounds simple, but I am at a loss for a solution. Does anybody out there in EXCEL-land have a solution ?
I have a folder containing excel files with dynamic suffix names. I have files for all days starting from the 1st of the month – for example : Performance_01012010.xls, Performance 02012010.xls, Performance_03012010.xls till Performance_31012010.xls.
I want a VBA code to retrieve the date out and change it automatically (means it should add 1 automatically to the previous date). For example, if I open Performance_05012010.xls, my macro should SAVE AS this file to Performance_06012010.xls.