Check Two Columns At The Same Time And Return The Value In The 3rd
Aug 6, 2009
Is there a good way to check two columns at the same time and return the value in the 3rd?
Example
12 0.07 8
12 0.37 10
12 0.82 12
12 1.30 15
12 3.90 22
12 8.00 28
12 15.00 35
I look for 12 in the first column with vlookup but I need to also look for a figure in the 2nd column which is greater than my figure. So say I want 12 & 6.0 I would want the formula result to be 28 because the nearest larger number in the table column 2 is 8.00.
View 2 Replies
ADVERTISEMENT
May 5, 2006
I have a user form with textBox1 = start time (entered as "[h]:mm") and text Box2 = finish time (entered as "[h]:mm"). I would like textBox3 to display the difference between the start time and finish time as a general number!
For example
Start time: 21:00
Finish time: 06:30
Hours worked: 9.50
Start time: 12:30
Finish time: 23:00
Hours worked: 10.50
View 9 Replies
View Related
Mar 13, 2008
I want a cell to return the lowest value in a time series of data that comes AFTER the highest value in the range (so date specific). I have the formula for finding the highest value. The time series range changes on a rolling 1 year basis and I have attached the file. The cells highlighted in orange are the ones that need calculating.
View 2 Replies
View Related
May 5, 2008
I have a table that has 6 columns and 5 rows. I need to check a name (division) against the column heading, then and return a classification from the first column based on the score.
Below is an example of what I am using (I'm not sure how to post a screen shot):
DIV1 DIV2DIV3DIV4DIV5
A91.7689.4198.82100.82102.35
B111.43108.57120.00122.00124.29
C141.82138.18152.73154.73158.18
D195.00190.00210.00212.00217.50
E195.10190.10210.10212.10217.60
DivisionDIV3
Total Score 155.6
ClassificationC
View 9 Replies
View Related
Feb 4, 2010
I would like to check/search if (FileName As String) is still exists in its directory.
--Why as string: because I have a hidden kollom where the links to the files are in txt format.--
I can't write VBA But maybe I can sketch it?
View 14 Replies
View Related
Aug 27, 2009
I have a vlookup formula I would like to add another If statement to.
=IF(ISNA(VLOOKUP($O2,Table!$A$2:$I$72,9,0))=TRUE,"Not In Table",VLOOKUP($O2,Table!$A$2:$I$72,9,0))
This works fine, but if the field that it is returning (9 in the case above) is blank, I get a zero in the destination cell.
Can I add another check in this formula to see if the destination cell is zero, but display a blank?
View 2 Replies
View Related
Jun 11, 2014
Let's say i got something like this
A B C D Result
200 250 Apple 600 Melon
251 450 Orange 225 Apple
451 700 Melon 325 Orange
751 900 Grape 457 Melon
So based on my example above, I have those data from column A to column D Now, how do I check if the value from column D belong to which category from column C based on the column A and B?
225 -> 200~250 -> Apple
325 -> 251~450 -> Orange
etc.
The result will appear on "Result" Column
View 4 Replies
View Related
Sep 12, 2007
I am tryng to perform a logical statement using 3 fields, ex
A1>0,B1<0,C1<0 returns
A1>0,B1>0,C1<0 returns
A1>0,B1>0,C1>0 returns
end statement
View 9 Replies
View Related
Aug 4, 2008
I'm quite new in VBA and it can become a painful process to complete a working code. What I'm working on is a small process which looks up in individual cells within a range (ccy), for a particular value (EUR or USD) and if it finds that value, another cell in the same row with the value found is entered a certain text. What I wrote is:
Dim ccy As Range
Dim zone As Range
Dim i As Integer ...
View 7 Replies
View Related
Apr 26, 2006
I have attached a sample for better understanding. First of all, I need to check for the highest value in Col B and lowest value in Col C in the range from Time 0900 to 1100 only. I need to use the check time function (which i have no ideal how) rather than selecting the number of rows to check.
View 9 Replies
View Related
Nov 16, 2009
I have several rows with numbers that is either 0, a balance or a text like n/a. I need a formula that return true if all are 0 or contain n/a. If there is one balance shall it be false. Any suggestion? See example:
View 6 Replies
View Related
Dec 19, 2012
I've tried this in formulas (if, if/and, if/vlookup, if/vlookup/and) and I've been trying to write a macro for this (which I'm thinking needs to loop).
Problem: I have a report that is broken into three categories.
Column A includes locations, Column B includes vendors. Across the top, the monthly report is broken into four classifications (trans types), which are then further subdivided by quantity and cost. (Rough estimation is provided below)
Locations
Vendor
Z53
Z50
Z51
Z52
[code]....
My data comes in sorted by location, and subtotaled by vendor and trans type. So I'll have a row of data that includes:
Location 1, Vendor A, Z51, $200, 2
Location 1, Vendor A, Z53, $150, 2
Location 1, Vendor B, Z53, $150, 1
...
What I need to do is pull the data for Z53 based on Location & Vendor. So from the data is would read Location 1 & Vendor A and then find them on the report and paste into the appropriate row (in my report Z53 qty is col E and $ is col F).
I was trying to do a macro that within a determined range (finding the first and last instance of Z53) would match location and vendor to the monthly report and paste the values of Qty and $ into the appropriate fields. Below is what I managed to mangle:
Code:
Dim Holder1 As Range
Dim Holder2 As Range
Dim Holder3 As Range
Dim Holder4 As Range
Dim Found As Range
Dim y As Range
Dim x As Range
Dim Z0 As Range
[code]......
I was originally trying to match from the report to the data and then copy back to the report, but I had the idea of instead taking the location and vendor from the data and finding the match on the report and pasting. That way I wouldn't have to worry about errors (unless a new location was added that was not included on the report - which I think is an easier fix than trying to go the other way, but maybe not).
View 9 Replies
View Related
Apr 28, 2013
I have 2 sheet
1-"Check Employee Hours"
2-"Check Hours"
Below is what Check Employee Hours looks like
Below is what Check Hours looks like
I want to the user to press ebutton i.e Sunday and macro does the comparison.
Process
I would like macro to look at sheet "Check Hours" column "E" (cell E4) and compare it against the sheet "Check Employee Hours" column "E" (cell E7). If the hours matches i would like to say OK on sheet "Check Hours" cell E4, if it doesn't match then say CHECK.
View 9 Replies
View Related
Jul 21, 2007
Is there a simple function to check if a time has been or is entered in a cell, just like the IsDate function.
View 8 Replies
View Related
Aug 26, 2007
I am using VBA to determine the data type of the active cell value. I have the following:
'To check Number
IsNumeric(ActiveCell.Value)
'To check Date
IsDate((ActiveCell.Value)
'To check Formula
ActiveCell.HasFormula
'To check Text (*not perfect solution)
WorksheetFunction.IsText(ActiveCell.Value)
However, I cannot find the way to check for Time. In addition, the method IsText will return True even if the active cell value is a date.
View 8 Replies
View Related
Nov 24, 2008
I am looking for a formula to return either True/False in Column J if the font color in Column H is Red.
Is there a formula that can do this?
View 8 Replies
View Related
Feb 15, 2010
I've posted this query before, not on this forum, but I don't think the replies I've had so far are going to do what I want. Initially I was looking for a formula, but the suggested pile of nested IFs won't work for the number of conditions. I saw a previous post on here for a VBA macro to search for a text value in a cell against the cell contents of a range and it seemed to do at least the first part of what I wanted. I attempted to manipulate it a little to test its applicability for my own nefarious purposes but for the life of me I can't get it working.
This is complicated by the fact that the actual data is commercially confidential, so I can't show you the actual file, but I can fake what I want with two simpler ones. I've attached them to this post. What I want is a fair bit more complex than the other post I found - I want to be able to compare a partial text string from a given cell in a range ('Check Value' in the attached TestBook2 ) against the strings in a range of cells ('Value 1' in TestBook1), and return the corresponding value from 'Test Value' to the corresponding adjacent cell to the tested 'Check Value', with an order of precedence, for example...
Testbook2 contains an entry in C5 of 'a, e, h, z, x, y'. Testbook1 shows that the return for a, b, c, or d is 'moo', for e, f, or g is 'steve' and for g through q is 'fred', all others being no returned value. Moo>steve>fred, so I want the corresponding 'moo, steve. fred or <blank>' cell to contain 'moo'. Conversely, C6 contains 't, u, z' and therefore shouldn't have a value in 'moo, steve, fred or <blank>'. C12 contains 'f, z, s, y, u' and C15 'i, x, z, s', and therefore should display 'steve' and 'fred' respectively.
View 3 Replies
View Related
Nov 25, 2006
I would like to merge a colum with a date and a column with a time into one to show DD/MM/YYYY HH:MM
I have tried merge cells and it takes out the time and leaves the date only.
View 7 Replies
View Related
Aug 18, 2009
I have a spreadsheet in which a check box fills the corresponding cell with the value "TRUE" if checked and "False" if unchecked. I use this check box for several functions (e.g. assigning a unique ID number). One of the functions I would like to make is a time and date stamp in another column when a user checks a box.
I have perused some of the past topics on this subject and there are a few hiccups in the other fixes.
1. I can't simply set the iterations to one because this sheet also is used to calculate expenditures, fund balances, etc. I need the calculations to be ongoing.
2. I currently have a check box macro that placed a check box on a thousand rows. It may require more rows later on. I need a solution that sets up a time stamp for all of these rows, not just a macro for one row at a time.
3. I need the time stamp to be static. I need to know when entries were made. I cannot use track changes, because we will be using this data to measure the effectiveness of our process. I need to be able to add and subtract the time between the timestamps.
View 10 Replies
View Related
Mar 16, 2007
I've done quite a bit of searching in the forum and online and haven't found anything that's generic and can be used at anytime.
What I'm looking for is a way or for code that tells you how long it takes a macro to run from start to finish, something that can be used to time any macro. I've seen some threads in the forum where people indicate that it took x amount of seconds for their macro to run but not sure how to do it.
View 9 Replies
View Related
Aug 7, 2007
I have a column A with some dates at this format "dd-mm-yyyy hh-mm".
In this list, some hours are missing, and I don't know which ones.
In order to find the missing hours, I created an additional column B, displaying all the hours, this way:
B1=01-01-2006 00:00:00
o
B1=A1
And then : B2=B1+"01:00:00"
Then, in column C, I compare both columns A and B:
C1=IF(Value(B1)=Value(B2),ok,missing)
As a result, I first get some "ok", and then more and more "missing" statements, even though the dates look the same.
I checked the numerical values of my dates. At the first "missing" statement, I saw that there is a slight difference in the numerical values, at small decimals...
Can you tell me how to define my date /time in a good way, in order to avoid this kind of problems, please?
(I could take the int part of the numbers, but this could lead to further errors, so I prefer to define my dates in the right way, from the beginning).
View 3 Replies
View Related
May 21, 2008
I am trying to write a formula to figure out Body Mass Indexes for certain age groups and whether or not they fall into a High or Low risk category. So, I am trying to write a formula that does the following. I have 3 columns, Gender, Age and BMI. I need the formula to do the following.
IF Gender = M AND Age >18, <39 AND BMI >7%, <19%, Then return an "L" into 4th column
IF Gender = M AND Age >18, <39 AND BMI >19%, Then return an "H" into 4th column
IF Gender = M AND Age >40, <59 AND BMI >14%, <23%, Then return an "L" into 4th column..............................
View 2 Replies
View Related
Dec 28, 2007
what I want. It relies on an input box asking the user to enter a part code, which when found creates a duplicate copy. However, if the user enters a part that doesn't exist I get a run-time error. Can anybody point me in the right direction so when a user enters an incorrect part they get a message telling them it doesn't exist.
Private Sub SortTest_Click()
Dim s As String
Dim r As Excel. Range
Range("A2").Activate
s = InputBox("Enter the number you wish to find")
If StrPtr(s) = 0 Then
MsgBox "You must enter an existing part number!"
Else
Set r = Cells.Find(What:=s, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
Range(Cells(r.Row, "A"), Cells(r.Row, "AH")).Copy
Sheets("APL").Cells(r.Row, "A").Insert Shift:=xlDown
Application.CutCopyMode = False
Application.Goto Sheets("APL").Cells(r.Row, "H")
Selection.Offset(-1, -5).ClearContents
Selection.Offset(-1, 0).Select
End If
End Sub
View 7 Replies
View Related
Sep 13, 2007
Allows me to check like 10 different text values and return false for all of those in the conditional formatting rule. When those are not present, the conditional format is true thus applying the format.
I tried
=NOT(FIND("text1",$A$1,1))
It did not work because I believe this statement doesnt give the rule its TRUE value its looking for.
I am having trouble with this, to clarify I need the below...
Cell has conditional formatting checking for text1 text2 text3...text 10ish and if they are present nothing will happen and if they arent present then format the cell.
EDIT: to clarify, the code should look for either text1 or text2 or text3 so on...
View 10 Replies
View Related
Apr 3, 2012
Use look up to check batches of data a return a value dependent of multiple ifs?
I have this formula from here
=LOOKUP(COUNTIF(C4:C7,""&0),{0,1,2,3},{19.9,29.9,39.9,49.9})
What I am trying to achieve is using the above can it check
C4:C7 Grouped and named "first"
C8:C10 Grouped and named "second"
C11:C13 Grouped and named "third"
If one from each group is selected it returns 1 value, if 2 of each are selected it returns a second value and if 3 of each are selected it returns a third value?
I thought by grouping them it may give me the desired results but all it does is change if I select more than one from any of the groups.
View 2 Replies
View Related
Jan 5, 2010
I've got some time values in an Excel Sheet in the format hh:mm:ss. I need to split them into columns (including the colon) like below:
hh: | mm: | ss
I can do this manually using text to columns but when I use text to columns in my macro, it automatically changes the time format to h:mm:ss PM
View 2 Replies
View Related
Dec 5, 2008
How can I check (using VBA) if 2 columns (F and G) are already grouped.
View 7 Replies
View Related
Nov 26, 2007
I would like to count al the rows where in certain columns there are certain values.
For example:
=SUMPRODUCT(--(Bakjes!$C$2:$C$4000="1");--(Bakjes!$G$2:$G$4000="")
This works fine. However, I would like to look in columns N2:W4000 as well if in that specific row value x is present. This gives:
=SUMPRODUCT(--(Bakjes!$C$2:$C$4000="1");--(Bakjes!$G$2:$G$4000="");--(Bakjes!$N$2:$W$4000="x"))
This gives a #value error. Is it not possible to look in multiple columns at one time with sumproduct?
View 9 Replies
View Related
Jun 14, 2009
I'm trying to check if data in column u is in column g if so highliglt the
Cell row in column G
Sub Macro1()
Sheets("Recipes").Select
Rows("2:5602").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
rlc = LastCell(ActiveSheet).Address(False, False)
lr = ActiveCell.Row
lc = ActiveCell.Column.............
View 9 Replies
View Related
Nov 16, 2009
I have a worksheet with many dimensions and I would like to have a formula or macro to do the following: I need to check 4 different columns that have dimensions and calculate the best combinations in order to fit within the least amount of 96 inch boards.
View 9 Replies
View Related