Range().Value = Now Returning Time In Multiple Rows
Apr 30, 2008
The purpose of my code is to time production cycles for heavy equipment. There are five - six segments in the cycle, and it's possible that not every segment is included in each cycle. It's also possible that the cycle will not go in sequential order.
Here's a snippet of
Sub MacroD()
Dim LR As Long
LR = Range("D" & Rows.Count).End(xlUp).Row + 1
ActiveSheet.Unprotect
Range("D18:D" & LR).Value = Now
UserForm1.ListBox1.Text = "Time"
UserForm1.ListBox1.SetFocus
' UserForm1.Show
End Sub
Sub MacroF()
Dim LR As Long
LR = Range("F" & Rows.Count).End(xlUp).Row + 1
ActiveSheet.Unprotect
Range("F18:F" & LR).Value = Now
UserForm1.ListBox1.Text = "Time"
UserForm1.ListBox1.SetFocus
' UserForm1.Show
End Sub
My problem is that when the macro runs, it returns the time in more than one row and overwrites the previous timestamp. It starts in row 17, and will record the first time in 17 and 18. When the macro is run again, the time will be recorded in 18 and 19. When it's run a third time, the timestamp is recorded in 18, 19, and 20. So essentially, I'm losing all of my previously recorded data. When I finish, all I have left is the timestamp in row 17 and whatever the last time recorded is.
View 13 Replies
ADVERTISEMENT
Apr 24, 2014
I'm attempting to match a name with the row and column numbers of data that is laid out in a grid format. It looks something like this:
Denson
Matthews
Smith
[Code]....
This works just fine, except for the fact that once in awhile the same name will appear in the grid twice, and the row and column returned will be off (it will return the row for one of the Smiths, for example, and the column for the other).
I know why this is occurring so I'm looking for a better way to do this. The good part is that I don't necessarily need both locations returned for each "Smith" ; I just need the correct row and column for at least one of the instances. I'm looking for a better way to do this.
View 1 Replies
View Related
Nov 6, 2009
This is a floowup to the issue that was originally posted as "Returning MAX/MIN values from multiple rows in a named range ". I marked that post as solved since I have worked through part of the issue and since have a different one.
View 2 Replies
View Related
Jun 10, 2013
I have a spreadsheet of prices (raw data), and I need to pull out both the most recent price for each item for a specific customer code for each item, as well as the second most recent price, (essentially the old price), for that customer code for each item.
I have columns for ITEM (code), PTC (Customer Code), PRICE, and EFF (Effective Date). For each item code, there are multiple prices for multiple customers, such as in the linked workbook.
I am currently using the formula, =INDEX(PRICE,MATCH(1,(F2=ITEM)*(G2=PTC),0)) to pull out the last price. This works because the last price is on top based on sorting. What I need is a formula that pulls out the next oldest price for that item/ptc combo. I tried using the SMALL function to no success.
[URL]
View 2 Replies
View Related
Oct 8, 2013
I'm working on a database right now for our school, similar to a directory. What I want to do is be able to look up what items a staff member has been issued and when/if they were returned. What I have right now is one sheet with all the information about the staff that looks like the one below. I want to create a separate sheet where you could look up a staff member by last name and can find all the information in the array relative the the specific cell looked up.
Last Name
First Name
Position
Building
Items
So, on the "lookup" sheet, I want to be able to input either Doe and have the look up return cells B2:E6, or if I input Smith it should return cells B7:D11.
I've been experimenting with Vlookup, hlookup, index, and match but haven't been able to get exactly what I want..
View 8 Replies
View Related
Feb 5, 2013
I have two workbooks at the moment, one which holds a whole host of customer and accounts details and another which holds only the customer details. What I'm trying to do is cross reference the two to determine if a customers details appear on both and if they do highlight this, ultimately I'd like it to pull the customers account number back but even if it highlights a match that would be sufficient.
The only unique criteria I have to do this are customer surname and customer postcode.
In the Customer details spreadsheet I'm attempting to enter a formula which will look at the specific surname & postcode held on the row in which it is entered. It will then look at all of the rows on the other spreadsheet and determine whether any of them meet both criteria.
If they do I'd like it to display "match" if they don't I'd like it to display "no match"
View 2 Replies
View Related
May 13, 2008
I would like to rows based on multiple column conditions criteria. ie., if the columns N, O, P values are "", then hide the particular row. The logic given in the website here, i tried But, it is not 100% working. It works for a few rows at the start of the database & it works for the rows at the end of the database. In between, for a few rows, even if the column values are "" it does not hide those rows.
View 2 Replies
View Related
Mar 15, 2013
I wonder if Excel allows scrolling many columns or rows at a time. That's right, I have a worksheet with frozen panes by "D2" cell; then there are sets of 4 columns for each day of the month (for example "D:G", "H:K" and so on). I need when I scroll horizontally, that every first column of the set to snap at the edge of pane at once. In other words, is any elegant way that usual scrolling pace of one column/row at a time to be changed to 4 at a time?
View 3 Replies
View Related
Nov 7, 2009
I'm the Held desk manager . I'll have my folks logging in every time interval and work for 9hrs. Now I wanted to see at any given point a day the number of folks I have on my desk .
I have created table " A " and I'm looking for a formulae so that I get my data like table " B " .
To give more insight about table '" B " - During 00:00 - 00:30 , I'll have 41 people slowly goes down as people log off..
View 13 Replies
View Related
Dec 9, 2012
I am working on a spreadsheet that deals with times such as a work schedule, how every the schedule cells are in a time format, and my if function will only return "check"(which is false). my code works if it remove the time formatted cells but i want to keep the document in its orginal format.
=IF(Mngmt!F16="PH","",IF(Mngmt!F16="OFF ","",IF(Mngmt!F16="VAC ","",IF(Mngmt!F16="8:00:00 AM", "MIKE", "CHECK"))))
The bold and under line portion is where my problem is at.
Its looking to the mngmt tab to find f16 when it equal 8:00:00 AM (scheduled time in time format) but returns ""check"(false).
View 4 Replies
View Related
Aug 9, 2009
the Times work fine 22:00pm to 5:30am or 6:00am to 5:30am
Formulas
J4
=IF(ISNUMBER(D4),(D4>E4)*MEDIAN(0,E4-N$4,O$4-N$4)+MAX(0,MIN(O$4,E4+(D4>E4))-MAX(N$4,D4))-F4-L4,0)
K4
=IF(ISNUMBER(D4),MAX(0,MOD(E4-D4,1)-J4-L4-M4-I4-F4),0)
L4
=IF(ISNUMBER(D4),IF(MOD(E4-D4,1)-F4>P$4,(MOD(D4+P$4,1)>E4)*MEDIAN(0,E4-N$4,O$4-N$4)+MAX(0,MIN(O$4,E4+(MOD(D4+P$4,1)>E4))-MAX(N$4,MOD(D4+P$4,1))),0),0)
M4
=IF(ISNUMBER(D4),MAX(MOD(E4-D4,1)-F4-I4-L4-P$4,0),0)
but if I try 22:00pm to 6:00am or later
The following is displayed
Negative Time in J4 and the wrong result in K4
this is not what I need
It should be showing the following
J4 2:00 K4 5:00 L4 00:00 M4 00:00
View 9 Replies
View Related
Feb 7, 2014
Certification and Training tracking.xlsx
I want to create a certification only list on a separate tab of training that has been completed where a certification has been issued (as indicated by a "Y" in the "Certification?" column on the training tracking tab) and then populate from some of the fields vs. all of the fields.
What I have now, only pulls the first occurence, not all occurences. I saw that I could have identified the multiple columns that needed to be populated, but it didn't work either, so I'm fine putting a separate vlookup in each column.
View 6 Replies
View Related
Mar 21, 2014
Index across multiple sheets returning multiple values
I am building a payroll workbook and I need to build a sheet that will allow me to choose an employee name and the formula will return all the data related to this employee. I found this forumla to do this: =IF(ROWS(...)<=...;INDEX(INDIRECT(...);SMALL(IF(...=...;ROW(...)-ROW(...)+1);ROWS(...)));"")
But in my workbook, the data is on multiple sheets . How do I adapt this formula to look into 12 sheets?
that data would be returned in order of the date of the pay.
file: Test formula on payroll_v3.xlsx
View 4 Replies
View Related
Mar 6, 2014
I am using the following range to copy data from Column A (from rows 3 on the the last row). How can I include Columns B and C into this range also, but still using Column A to find the last row?
[Code] .....
View 9 Replies
View Related
Oct 20, 2006
I posted this on Mr Excel, but did not get an answer. I hope someone here can help.
I have a rather large financial worksheet that I am trying to extract some specific data from.
The sheet contains budget and expense #'s for the fiscal year for several projects. The project names are listed in column G and the same project can be on multiple lines, depending on what the expense is. Column J contains either "Cap" for Capital, or "Exp" for Expense. The monthly data starts at Row L. Each month has 6 columns, the one that matters for this scenereo is the 5th one for each month, which is the Forecast Column.
Our Fiscal Year is April 1 - March 31, but this sheet ruins from March - March so that we can carry over anything from the previous year. So the forecast column for March is column "P", April is column "V" and so on, adding 6 columns for each month.......
With me so far?
What I am trying to do is get the total forecasted expenses amount for a specific project for the remainder of the fiscal year.
In other words I need to look for a specific Project Code in Row G, look for "Exp" in Row J, Then get only the numbers that are in the Forecasted Column for months in the future and add them all up.
Just in case that is not totaly clear----
criteria to meet
Column G = "Project Code"
Column J = "Exp"
Row 2 > this month
Row 3 = Forecast.......................
View 9 Replies
View Related
Aug 14, 2009
I have a need to add or delete rows from a number of known sheet names using a table of variables on another sheet that tell me the start row of the sheet I need to go to and the number of rows I need to either add (ie copy rows and paste / insert these) or delete (delete rows).
There are multiple blocks of data I mey need to amend on each sheet and the values in my table of variables will change on each iteration (ie if I delete rows from the first block on a sheet, the start row for the 2nd block I need to amend will need to be updated in the table of variables before I can edit the 2nd block on that sheet).
I have been able to get the process to work for a single instance (ie one sheet and amendments to the first block of that sheet) but I can't figure out how to create the loop to elegantly move to the next set of variables and repeat the process for the 2nd, 3rd, 4th block etc on the first sheet and then move to the 2nd sheet to repeat the process etc.
Public Sub EditCurrentBlock()
Dim rowcount As Integer
Dim startrow As Integer
Dim endrow As Integer
Dim rowcountBal As Integer
'Dim selSheet As Worksheet (tried to use this to nominate the sheet variable but
' had problems so scrapped it)
'Reconfigure the GP Revenue block.................
View 2 Replies
View Related
May 6, 2014
What is required to delete the visible rows post filtering?
ActiveSheet.ListObjects("Table24").Range.AutoFilter Field:=9, Criteria1:= _
"Other"
'insert code to delete visible rows
ActiveSheet.AutoFilter.Range.Offset(4).SpecialCells(xlCellTypeVisible).Cells(1, 2).Select
ActiveSheet.AutoFilter.Range.Offset(4).SpecialCells(xlCellTypeVisible).Select
ActiveSheet.AutoFilterMode = False
Selection.Delete Shift:=xlUp 'this is where the error is occuring.
End Sub
View 3 Replies
View Related
Nov 10, 2009
I need to retrieve information from multiple rows in a table based on certain criteria (date compared to today's date, existence of "no" in a column).
View 6 Replies
View Related
Oct 3, 2013
I have created a worksheet with 7 Tabs. 6 of the tabs are tables of existing parts and their catalog information. The Front Sheet I want to be a place where people can select data via a drop down or typed in, and in turn have that headsheet display the results of the search.
I have the 6 tabs broken down by part type, and figured those can easily enough be the first choice on my worksheet. So by picking that I can direct excel to which tab we want to run the search on, but ater that I'm drawing a blank.
For an example, say I'm looking for a Elbow that has a 6 size on one end. I would like to use the drop down to choose "Elbows" and then like to select/type 6 in the End 1 size box and have Excel show me all the reslts from the Elbow Tab that match that criteria.
View 4 Replies
View Related
Aug 12, 2009
I'm trying to have an IF function analyze a sheet and then return a list of names that return a True
=IF(AND('LTV Watcher'!L2="Yes",'LTV Watcher'!M2=""),'LTV Watcher'!A2)
and it returns:
John Doe, LLC
however I'd like it to function to analyze a range of cells:
say L2:99, M2:99, and A2:99
View 9 Replies
View Related
Mar 27, 2014
I have a list of projects and a list of milestones and I want to extract every milestone for a project one by one. I have found a way to do this for one project but as there is not a fixed number of milestones, it's proving tricky to do it for multiple projects as I don't know how to tell the formula to stop looking at the Project 1 and move on to Project 3 for example.
This is a very very simplified version of my table (there are other columns inbetween and many more projects)
Project 1Milestone 1
Project 1Milestone 2
Project 1Milestone 3
Project 1Milestone 4
Project 1Milestone 5
Project 2Milestone 1
Project 2Milestone 2
Project 2Milestone 3
Project 2Milestone 4
Project 2Milestone 5
Project 2Milestone 6
Project 2Milestone 7
Project 3 Milestone 1
Project 3 Milestone 2
View 2 Replies
View Related
Aug 16, 2014
How the following problem gets sorted out
ColumnAColumnB ColumnEColumnF
33rohan55
44tata55
55dev44
55rony33
As you can see from above i want to lookup all the values in column E in column A and return the corresponding value in column F.
View 4 Replies
View Related
Dec 15, 2013
Trying to pull data from one workbook to another using Vlookup.
The worksheet has 7 columns (date, day of week, time or arrival, package, departure time, patron count and group name) I would like to pull all the data for a specific date in a seperate workbook.
I know I require a nested formula but cannot seem to get the variables correct:
View 2 Replies
View Related
Jan 28, 2009
I have been searching all day about this topic and while there are many "solutions" none of them fits my criteria and I can't figure out how to tailor it.
I am using a very basic data sheet to populate a purchase order. I want to be able to search a style and have all the data (color, units and price) automatically fill in upon entering the style number, I have been using vlookup but this only works if there is one color per style.
I have found different lookup functions that give the value +1 when the data is sorted but it returns the value even if it doens't fit the search criteria, I only want to return the second value if it correlates to the initial lookup
View 5 Replies
View Related
Jan 30, 2009
I've tried to amend the formula's posted above but to no avail so am hoping someone can have a look at the attached.
I would like to be able to use Vlookup or similar to complete a table (starting in cell A19) based on the surname added in B16.
View 2 Replies
View Related
Jun 22, 2009
I am trying to connect a special date and a price to a special name (please see the attached file).
In sheet 1 I have the following:
- In column A I have a set of different names.
- In column B I have a set of different dates.
- In column C I have a set of different prices on bonds that off course refers to the different names at their respective dates.
In rest of the sheets I want an overview of the different bonds, and what their prices are at the exact date. The problem is that if I use the vlookup it is only the first value that will be extracted. How can I get all of the prices corresponding to the different dates to the correct bond. I also want the possibility to update this every day.
View 3 Replies
View Related
Apr 11, 2012
I'm trying to get a value to return based upon three criteria, sales rep, compensation plan and calculation method.
For each sales rep (there are 20 reps), there is an option for one of five comp plans and for every comp plan, there are six calculation methods (these six methods are the same for every one of the five comp plans).
I know I need to use the Indes(Match()) set-up, but I'm having the darndest time figuring out how to set up the source matrix to do this right.
View 1 Replies
View Related
Mar 6, 2007
I am looking to perform a search that will return a match and place it somewhere else, and then search again until its finished the list?
View 9 Replies
View Related
Jun 3, 2009
Just for fun (and a massive headache) - I am trying to do the following
=IF(INDIRECT("'"&$Q$1&"'!E2")="Table",IF(INDIRECT("'"&$Q$1&"'!H2")="Yes","Graph","Table"),IF(INDIREC T("'"&$Q$1&"'!E2")="Descriptive",INDIRECT("'"&$Q$1&"'!J2")," "))
Where Q1 is the name of the worksheet I want to access.
Where E2 is the type of information I am trying to display (Table or Descriptive)
Where H2 is if it needs a Graph or Not
Where J2 is a comments field
What I am wondering is if the following values are set
Q1= May-09
E2 = Table
H2 = No
How can I get it to return the information contained between cells P2 to S3 on worksheet May-09
View 3 Replies
View Related
Apr 18, 2014
I have attached a file with an example of what i am looking for. The data in columns A and B are my original Data. There are multiple instances of e-mail address on the left but I need to bring in each data horizontally. I would like a formula to enter into E2:J6 to pull the information in.
Book2.xlsx
View 9 Replies
View Related