X Condition Lookup: Find The Specific Value Within The Table Or Array
Aug 21, 2008Given three criteria (category, name and date) I want to find the specific value within the table or array. refer to attachment.
View 4 RepliesGiven three criteria (category, name and date) I want to find the specific value within the table or array. refer to attachment.
View 4 RepliesLet's say I had the following data ...
47
50
50
50
44
50
46
50
Basically, I have 4 numbers, out of 50, as seen above...I want it so the last number (46 in this case) is special; what I mean by that is I want the following conditions to be met.
--If the special number is the lowest, just take the average of the four numbers, and divide it by 50
--If there is a (are) number(s) lower than the special number, then I want it to locate the smallest
---The smallest number should then be "replaced" by the special number (for calculations purposes only, not in the actual table)
So, in this case, since the special number (46) is not the lowest, excel would locate the lowest number (44), and calculate the average of 47, 50, 46, and 46 (the 44 was replaced by 46).
I have three columns of Data. A is vehicle number, B is miles and C is a Date. I want to be able to pull the miles for the newest date when the user types in a bus number next to the formula. I think It can be done with an array formula but I am not 100% sure on how to do it. Also is it possible if they enter a vehicle number and a date that a different formula finds the miles for the most recent date to the date entered.
Excel Help.JPG
A b c d
100 100 x
100 y
100 z
I want to lookup 100 in colum b with a result of z instead of x in criteria c:d
I have a selection on a worksheet that has 4 consistent columns (A, B, C, and D) each with a variable number of rows all containing string type data. With this data I want to use Conditional Formatting so that when I have a string value of X in column D for any row, that whole row with the X in column D has it's color change to say grey, this should happen regardless of what strings are in Columns A, B, or C.
Below is the way I've been trying to do this thus far and failing, when I run this code below I can only get it to grey out the cell with the X not the whole row.
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""x"""
Selection.FormatConditions(1) . Interior.ColorIndex = 16
I have a spreadsheet that I would look up two criteria in the table array, which first is down the column and next cross the row.
It would be easier to explain the scenarios by referring to the attached file.
I have 40 or so case studies on one worksheet. Each case has four columns- the first is the year, and the next three are values for that year. Each study is 140 years long, but they don't all start in the same year. What I want to do is pluck all the values from the fourth column of each study, and total them up for each year.
View 9 Replies View RelatedI have 40 or so case studies on one worksheet. Each case has four columns- the first is the year, and the next three are values for that year. Each study is 140 years long, but they don't all start in the same year. What I want to do is pluck all the values from the fourth column of each study, and total them up for each year.
Here's how the sheet is set up- row 6 is a header row with four repeating column heads- year, value1, value2, value3. So year is in col A, E, I, M, Q, etc. up to FM. Value3, the one that I want totaled is in col D, H, L, P, etc up to FP. Each year column begins with a different year, (with some repeats) but each is 141 rows long, so that the first study begins in 1994 and ends in 2134, the second is from 1985-2125, the third is from 1991-2131, etc. I want excel to find all the value3's from 2007 and total them, all the value3's from 2008 and total those, up through 2145. The data range is A7:FP147. I tried adjusting some of the suggestions, but no luck. I was thinking I'd have column FQ with all the years 2007 on, and FR by the total of all the value3's from that year.
I have this code:
Code:
Private Sub CommandButton2_Click()
Dim myarr() As String, size As Integer, i As Integer size = WorksheetFunction.CountA(Worksheets(1).Columns(2))
user = Environ("username")
[Code]...
when the FOR-LOOP finds the username inside the column B (many times will have more than one result) I would select all the rows that have this username and display that data into a listbox but not only the rows that have the username but also I would like to get the next column C and D in the same row and display all those data into a listbox.
ID
username
date
status
1
usuario1
25/01
ok
[Code]...
taking the table above as example I have USUARIO2 twice in the column B so I would like to get that row and also the DATE and the STATUS from this USUARIO and display it in a listbox. If I'm the USUARIO2 and I click in the button Then I will have a listbox like this:
USUARIO2
26/01
denied
USUARIO2
27/01
ok
What should I add into my code to get this result?
Index Match lookup formula does not find valid entries that exist in the lookup table. Formula: =INDEX(tbl_Costs,MATCH( F8,tbl_Costs_PN,0),MATCH("Cost",tbl_Costs_hdngs,0)). I've verified that the matching criteria and values are, in fact, in the table and have made double sure that all cells are formatted the same. the attached file and show me the error of my ways.
View 7 Replies View RelatedI'd like to search for a specific value like (1) in an array of cells like (A:A). The result needs to be the average number of a different column (B:B) in the same row as the searched value (1). And the resulting number should be rounded up to the nearest 10.
Example below: (Find value = 1 in A:A) ... 1 is found 4 times.
A | B
1 | 295
3 | 123
1 | 400
5 | 425
1 | 354
1 | 400
In the example above there are 4 (1's) found. By adding all the values in column (B) of the same row, we get 295+400+354+400 = 1449, dividing that in 4, the average is 362.25, rounding that up to the nearest 10... THE RESULT I'M LOOKING FOR IS: 370
I would like to try and achive a conditional format that will require a lookup function. when the condition is met it places Yes or No into a cell and changes that row colour to red for the NO condition. and after 10 days from now the rowcolour is removed.
View 6 Replies View RelatedI am having a bit of a problem creating a formula for this report that I have to update every week. I need to be able to find the room nights and net room revenue values for the specific rate code in the "MATRIX" workbook.
On "CURRENT REPORT," I need D4 to pull up the value on "MATRIX" that equals "Room Nights" in column H and "CONABC" in column J. The same thing needs to happen for F4 but with "Net Room Revenue" in column H. The full report has about 500 of these codes in column J, and I need a formula that I can copy easily and will not be affected if codes are added or removed. This is super last minute - I need to finish this report by tomorrow morning, so take a look at the attachments.
I am trying to perform a lookup (vlookup) function in a cell in excel and wish to have the range as a variable, so that I can adjust which column the lookup function refers to.
View 4 Replies View RelatedAssuming 1st row is a header row
Sheet1, Column A
1230000_XL07 - WB OPS
1230001_XL08 - WB OPS
1230002_XL09 - WB OPS
Sheet 2, Column A
1230000
How do I lookup 1230000 and return 1230000_XL -07 WB OPS in B2
i have spent 40 hours, and still didn't find a solution. Please help is need it!!
example:
i have to find all articles with same code (222). first one has Q =100 second one Q=250.
soled Q=150
(i am talking about 5000 rows, 400 different or same articles per month- 12 months)
columnA-----columnB---columnC
222 ----------100---------0
111-----------50
333-----------70
222----------200---------200
333---------- and so on
first i have to deduct from the first one it finds (max. till 0 ...it can not be negative) ....after finding another one it deducts the rest---it means 50
Is there any kind of formula with this possibility.
if it is poorly writen please let me know for more info.
i am not an expert in excell, but i have tried variations of sumif, vlookup functions, but i always get stuck deducting the whole Quantity from all of the same (222) articles .
Add a condition to this formula Let us assume for the column (classes) and the condition is selected from the cell "G1"
Condition E2: E30 = G1
ID
NAME
CODE
Birthday
[Code]....
I need a formula to workout what is the most up to date firmware that should be installed on the machine. This will always be in column B. The second formula should work out the variance between the installed firmware and recomended. The formula cells will be normally held on a different summary sheet.
View 2 Replies View RelatedI am running an array formula which is working fine except that I now need to add a further condition: that a one of a number of values in cells C1:C8 is found in range $a1:$A500. I've tried Or with comma separation and with * separations but nothing seems to work.
Can anyone advise me of the syntax?
I currently have a Row with this value
row1 lh lh lh
row2 8 12 8 5 2
First I will need to check if the column has an "lh" if true then sum row2, however i will need a second condition that will check that if >8 it will use the value 8 instead of 12.
However if value is<=8 get that value from the cell.
In this case the correct answer is
8 + 8 + 5 = 21
8 (because it is <=8 get the value from the cell) + 8 (because 12 is>8 use the value "8") + 5 (because <=8)
I would like to change the greater than number to the value in cell 'I11' in sheet 'Linear Programming Data' and the less than number to the value in cell 'I12' in sheet 'Linear Programming Data'. The code I am using was done by recording a macro since I don't know how to code in vba.
Code:
Sub Results2()
' Results2 Macro
' copy table filter power by greater than and less than
Sheets("Finalizing Results 2").Select
Cells.Select
[Code] .......
I am trying to use lookup function to lookup for data in another table (we call it table A). Unfortunately, whenever the code is not in the table A, Excel will return the data from the previous row.... is there any possible way to prevent this... in another word, if the code does not exist in the table A, I want Excel to return 0 or some other figures.
View 9 Replies View Relatedwith the formula below..
=SUM((Sheet2!A$4:$A$17475=AM2918)*(Sheet2!B$4:$B$17475=AN2918)
*(Sheet2!H$4:$H$17475="Left")*(Sheet2!$E$4:$E$17475>=AR2918)*(Sheet2!$E$4:$E$17475)
im currently using a static array to select multiple sheets at once which works alongside another Sub
Sheets(Array("Group1", "Group2", "Group3", "Group4")).Select
i have a button that creates a new sheet and names it "GroupX" X being the next number, it automatically adds on the right number by itself and it works fine...
i want it my array to be dynamic so that i dont have to manually edit the array and the macro every time i add a new sheet.
i have tried things like:
Dim MyArray As Variant
Dim Shts As String
K = Sheets.Count - 4
For p = 1 To K
Shts = "Group" + p
Redim MyArray(K) As String
MyArray(K) = Shts
Next p
Sheets(MyArray(K)).Select
I try to add some conditions to get specific text. i.e.
if cell b4 <= 20% then cell f4=01.30min
if cell b4 >= 21% and <=50% then cell f4=02.00 hr
if cell b4 >= 51% and <=70% then cell f4=02.30min
if cell b4 >= 71% then cell f4=03.00 hr
I tried different ways, including select case but unsuccessful.
I have a 20000-row sheet generated by a daily report and I only want to work with about a quarter of this data; any rows that contain "PH4" in the M column. What's the best way to automatically single out this data to work with?
My initial solution was to create a seperate sheet to pull off all the columns with PH4 in the M cell, eg cell A8 would be:
=IF([WEB_StoSta_Rep.xls]Sheet1!$M8="PH4",[WEB_StoSta_Rep.xls]Sheet1!A8,"")
Then I could run lookups off that sheet. However, this feels like a sloppy solution to me, and Excel throws up an error when saving, unable to save external link values with available resources. Is there a better way of going about this?
I consider myself a beginning intermediate Excel user and am really learning a lot through this forum but have not run accross the answer to what I'm trying to achieve. I would like to return the value in the "Temp" column that meets all the conditions of the columns "letter", "day", and "time." Specifically, the "Temp" of "A", "Weekday", "East." I have attached a small spreadsheet. It seems Vlookup is the approach to use in combination with multiple if conditions or an array. But I am not yet comfortable with such a complex equation. Can someone provide me with some guidance or an equation that would work. So far this is how I've been learning. Looking at equations and deciphering how they are written.
View 5 Replies View RelatedBasically, I'm trying to alter the code by inserting another condition where if S12 = R than it will exclude the value found in D12, other wise D12 is included. It was initally setup with a range of $C12:$H12 but i had to write it out long to exclude $D12
Here's my ammended ...
I'm having a difficult time returning COUNTIF values for a positive match between 2 columns THAT meet a certain condition. Basically I want to iterate through column A sheet 1 (ONLY for values where column B is paid) and return a count for every instance there is a match of value A sheet 1 in column A sheet 2. In other words, I'm looking to find the number of ids marked as paid from Column A sheet 1 that exist in Column A sheet 2. I don't wish to return the actual ids, just the total count.
I've tried the following but I know there's an error in iterating through Column A the way I have it:
=COUNTIFS(Sheet1!$ColA:$ColA,Sheet2!$ColA:$ColA,Sheet1!$ColB:$ColB,"paid")
Sheet1:
ColA
ColB
123
paid
[Code] .....
Sheet2:
ColA
ColB
23
NY
[Code] .....
I have been asked at work to get some averages of data from an excel sheet. I have attached a sample workbook of the data i will be using. On Sheet1 is the data that will be looked at and on sheet2 is a sample of the results i need to achieve. I can get the data on sheet2 easy if i knew that data was static but in my case the data is going to be dynamic, so i don't know how many records each person is going to have each time if that person shows up in the record set at all. This rules out on static ranges to gather averages.
So far what i came up with is i use a macro to copy all the "Names" column to sheet 2 and then filter that data so that each name is unique, sort like a "key" for looking up values. Now i need to get averages of "Total Hours" worked in sheet 1 and display it in sheet 2 for each "Name". I have a formula worked out and almost have it where i want it but cant seem to get the range of data i need to be looking at. I need to get the Average Of hours Worked Per Person Where "Wk End Date" is greater than 1/1/2008 and the "name" matches up with the name in sheet 2.