Each row represents a call. If a call in column A equals "CW" and it has the highest duration (H:MM:SS) value in column B, then provide me the date (MM/DD/YYYY) for that call that is stated in column C.
i.e.
Column A --- Column B ---- Column C
AB ------------ 0:02:22 ----- 04/14/2007
CW ----------- 0:03:13 ----- 04/16/2007
CW ----------- 0:01:42 ----- 04/13/2007
Thus, the value that should be returned is "04/16/2007".
I am currently using an Intersect statement in a worksheet module to perform two things: 1. Insert a time stamp into row 2 when row 1 has a price inserted 2.To clear that time stamp if the price is deleted at some later date.
My problem is with the time stamp value being deleted by the user. If I try to clear the price (now that the time cell =empty) I get a Runtime error 91 - Object Variable or With block variable not set.
I would like to convert this code to a select case statement but I'm not sure how to do this in this situation. Would error coding be appropriate in this instance?
I have 2 sets of criteria, column B and D, both are ranked in column C and E respectively.
Cell h2 and h3 have the minimum requirements so I essentially want to add onto the RANK formula I have so if a person does not meet the minimum rank cells will return a null value.
I want to use an IF statement that returns 3 values. I can do it to return 2.
Example: I am measuring performance of individuals. If they deliver below 50% I can return the value "Needs Improvement". If they deliver Over 60%, I need to show "Excellent" and finally if they deliver between 50% & 60% I need to return the value "Good".
I am working with data that has numeric values in columns S, T and U. In column M I want to return the header of the column that has the largest value (S,T or U).
The problem is that it only sometimes works properly. I have found instances where the value in column T is greater than S and yet column S's header is still returned. What am I doing wrong?
IF the first letter (i.e. left most letter) in any of the cells in range F7:F17 is "R", return its content to cell L3 and put a line break between each (i.e. create a list within a single cell).
I've read line breaks can be put in by using &CHAR(10)& but can't get a full formula to work.
I am attempting to return a value in a table using an IF statement, but without referring to other values in the table.
My first column contains price break quantities; 5 10 20 50 70 100
The top row contains selling quantities; 1410192541517699105
The IF statement should return a "Y" in the cell if the value in the top row is greater than the value in the first column, but only for the relevant price break, i.e. the column with 51 in the first row should only have a "Y" in the row with 50. This would be much easier if I could work out how to post the workbook!
The formula cannot refer to other row values (otherwise it would be easy), and cannot use VB.
In column D I have an Expiry Date and in column E I put formula “=IF(D2<=TODAY()+90,"we have less than 90 days!!!","we have more than 90 days")” the formula works fine but my problem is I need formula if item have expired in column D its have to say in column E “ ITEM EXPIRED “ or something. I highlighted line in yellow below attached sheet.
I'm working on a spreadsheet where I need to return the column header where the value in that row matches the criteria from an if statement.
The column headers are departments, the row headers are customers numbers, the values show the % of items sold in that department as a % of the total purchases by that customer.
I need to make a formula for each row so that if the % in any of the current row's values is 75%-100% then get the column header for the column that value is in.
I know it's an IF statement, but I don't know how to return the column header for the value when the if statement is true.
I have data that has months in it that are spelled wrong and in different formats etc. I need to be able to search the range of data I have created in a separate table in order to return the correct abbreviation into my spreadsheet. See below:
Need to be able to search this range (A1:E12) and return the corresponding horizontal value in the last column (Jan, Feb, Mar)
Column A consists of cells with a variety of five digit numbers. My formula needs to return a text value if numbers are present in column A, this is what I tried: =if(A1="","Chassis") but it returns "False" instead of "Chassis".
OK i have put the membership cards on the same sheet as my raw data so to make the formulas easier. On the membership card i have under membership level i have the formula : =VLOOKUP($J$3,A:E,4,FALSE)
there is 3 types of level bronze, silver and gold
what i would like is if the level is gold after then an image to be placed in the cell rather than the word gold and a different image for silver and a different image for bronze.
I'm trying to set up an if statement that will recognize that if a cell is FHR it will do something...but if it's PHR it will do something else. I think I found the place where I keep getting an error but I'm not sure how to go about fixing the issue.
I am attempting to use a previously Set variable as part of the next Set statement, pretty unsuccessfully at present.
My purpose is trying to look up
Code: tb_SelJobID.Value
from a userform in Col Z then look across the row to Cols D,I,N,S & W (different types of work) to see if
Code: TbSelYr.Value
matches the year selected then insert a formula in the row to the left. Then loop down to the FinalRow.
Currently my Set Found1 statement does not recognise my Found10 value. I know it will be my syntax as it always is. I have cut down the following code to display where the problem areas are, Found1 thru 5.
Code:
Sub CmdGo3_Click() Dim Row As Range Dim FinalRow As Long Dim Found1, Found2, Found3, Found4, Found5, Found10 As Range Application.ScreenUpdating = False
I have an Excel Sheet which I use as Database. The database has 11 columns and I insert data with the following function:
Code: Sub testInsert() Dim adoCommand As New ADODB.Command Dim sQuery As String Dim i As Integer
Dim strTest As String
strTest = "test"
[Code] .......
Now I want to retrieve this data. i.e. I want all F1 where F2 and F3 are 0 AND I want them ordered descending. I'm trying to achieve this with:
Code: Sub testSelect() Dim adoCommand As New ADODB.Command Dim sQuery As String Dim mrs As New ADODB.Recordset Dim strTest As String
strTest = "test"
[Code] ....
The result I am getting looks like this: 9 8 7 6 5 4 3 2 15 14 13 12 11 10 1
I assume, that the data is interpreted as String instead of an integer. But I explicitely stated the data as Integer when storing the data into the DB.
I am trying to write a formula that will return a statement if a certain month is contained in the text within another cell. Formula is =IF(ISERROR(SEARCH("Dec",Assumptions!B2)),"Ensure Journal is Non Reversing","")
Cell B2 contains a date in the format of Dec 08, so if this date contains Dec, then return "Ensure Journal is Non Reversing", if it doesn't then leave the cell blank.
At the moment it is putting in the first test for every month I select and not changing to blank.
I have created a very long switch statement, which is too long to be placed in one row in VBA. I have attempted to put a space and underscore at the end of one line and continue the statement on the row below by placing a comma at the start of the second line. VBA will accept my efforts, but when I run the statement in the immediate window, the following error appears.
"Invalid procedure call or argument"
I understand that there are certain rules where I can split a switch statement onto two lines, yet I do not know what they may be.
If A1 shows 10:00am and A2 shows 4:00pm, then A3 calculates the total number of hours: =(A2-A1)*24
But if A1 shows "Off," then A3 shows 0: =IF(A1="Off",0,(A2-A1)*24)
Now, if I want to change "(A2-A1)*24" to another if-statement, how do I do this? I can always set up a hidden cell (A4) that contains the results of the first if-statement, and then say: =IF(A1="Off",0,A4). But can I do this without going through all the trouble of setting up hidden cells?