VBA - Loop True Column A And B To Find Highest Value?
Sep 12, 2012make and loop that loops true all values in column A and B. For example, if the cell A3 is higher the cell B3 then I want it to write the higher value in new sheet.
View 2 Repliesmake and loop that loops true all values in column A and B. For example, if the cell A3 is higher the cell B3 then I want it to write the higher value in new sheet.
View 2 RepliesI am looking for a formula that will find the lowest 5 number group in column A with a total value from column B under $100 in the below table.
1 $28.75
2 $28.00
3 $27.75
4 $24.75
5 $25.50
6 $25.25
7 $25.25
8 $16.50
9 $24.75
10 $26.50
11 $24.50
12 $27.00
13 $26.50
14 $23.50
15 $23.00
16 $19.25
17 $20.75
18 $25.00
19 $20.50
20 $20.50
21 $17.75
22 $22.50
23 $20.50
24 $19.75
25 $20.00
26 $10.75
27 $11.25
28 $5.25
29 $13.00
30 $9.00
I have two columns each having 8500 rows.
A= Zip code
B= Sales
Duplication of zips appear in column A - and I only need to return the highest sales in B. So based on the example below..I only need to return $500 in column C.
A
A2=50201
A3=50201
B
b2=$345
b3 $500
I have a worksheet where columns C, F, I, L, O record scores within a league. Each row records a persons score in that league and there are two rows per person recording their score and their handicap score. So Person A would be on rows 3, 4, Person B on 5, 6 etc. The persons name is recorded in Column B.
What I would like to do is to have a cell(s) elsewhere in the worksheet which show the highest score in that league and display that score and the name of the person who achieved it. This ideally would need to be done for the highest score and the highest handicap score.
For the life of me I can't even begin to work out how to do that or even know if it is possible in Excel.
So to clarify, lets say the highest score is in cell L7 and the highest handicap score was in M3. The cell(s) containing this formula should then show the name in B7 and the score in L7 and below it the name in B3 and the score in M3.
Im looking to find the max or highest time in column G based on the criteria (date selected and name) So if the date is the 10/02/2014 in G10 it would look up that date and the name and bring back the time in column H. I have put an example answer in H12.
View 9 Replies View RelatedI’m keeping tabs of some clay pigeon shooting scores. I go to alternate locations each week and normally shoot 100 clays, however sometimes it’s only 50. I’ve used MAX to find the highest score in Column D of a spreadsheet and it did what I required. However I now wish to find the highest number in Column D - but only include rows if Column C = P and column E =100.
Col B Col C Col D Col E Col F
date Location score out of % hit
25/10/2008A6210062
08/11/2008P3510035
22/11/2008A4210042
06/12/2008P6610066
20/12/2008A6010060
03/01/2009P295058
17/01/2009A5110051
31/01/2009P4010040
In other words I want to find the highest score for location P but only if that week it was out of 100 shots. It would return 66. Then I can do the same formula for location A and it would return 62. I can’t see how to do this and have searched the forum to no avail. It doesn’t look like I can just use the MAX anymore and I’ve tried incorporating that into a (nested) IF but unsuccessfully.
I am trying to Find a cell containing a string ("derf" in this case). Then bold the entire row and continue to loop till it hits the end of the row and column.
Here is what I have.
Sub Macro3()
Range("B65536").End(xlUp).Select 'Finds the bottom in column B and sets it to endhere
ActiveCell.Value = "endhere"
Range("A1").Select 'goto the top
Do Until ActiveCell.Value = "endhere" 'The Do Loop Starts
Rows("1:30").Select
Set rfoundcell = Selection.Find(What:="derf", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
With rfoundcell
rfoundcell.EntireRow.Font.Bold = True
End With
Loop 'Keep looping till it hits the bottom of the columns row!
End Sub
I have a massive amount of data made up of values taken every five minutes over several months. I want to find the highest value in a day for every day. I'm wondering if the best method is to define each day as a dynamic range and then use the max value command to get the highest value?
View 6 Replies View RelatedI have a large spreadsheet of data that contains 3 columns: Columns are Name, Revision, # of items. I want to find the # of items for the highest revision for each name. List looks like this:
Smith, 1, 30
Smith, 2, 36
Smith, 3, 18
Johnson, 1, 125
Johnson, 2, 130
Lopez, 1, 8
Lopez, 2, 12
Lopez, 3, 15
etc…
I'm only interested in the data for the latest Revision. There's over 500 names. A lookup or pivot could be possible?
using vlookup I am trying o find the highest value>>>>
e.g
Column A Column B
111036 01/05/09
111036 08/08/09
111036 09/10/09 <<<<
Is vlookup the correct way to go,,, if not could someone point me in the correct direction
I have a spreadsheet with a data sheet and a second sheet. On the second sheet I want to look up the value from A2 and find the highest date associated with this value in the data sheet.
This will be used to look at a number of projects that have multiple dates, and I want the latest date i.e. the furthest into the future. To add a spanner to the works, some dates are recorded as N/A so I obviously want to ignore these. I have attached an example workbook if anyone has a couple of minutes to take a look.
The following calc works perfectly to find the latest entry in a column of meter readings in one worksheet and return the value to a master worksheet.
View 4 Replies View Relatedis there a way to write a macro that will do a find and replace and increase the find value by 8 and increase the replace value by 2 each time?
View 2 Replies View RelatedI have the following 2 formulas that determine the top 2 scores and return the respective headers, but they aren't perfect.
=INDEX(T1:V2,1,MATCH(MAX(T2:V2),T2:V2,0))
The above returns the max, however doesn't take into account scores that are a tie or 0 values
=INDEX(T1:V2,1,MATCH(LARGE(T2:V2,2),T2:V2,0))
The above returns the 2nd highest value, but some instances the output is correct (if there is a tie or a 0).
How can I fix both of these equations and also determine the 3rd highest score?
I have a cricket excel sheet that contains batsmans scores over a season. These scores are kept in non-contiguous cells for each game (ie. D5, J5, P5, V5 etc..) In the cell next to the score is an option for the user to enter an '*' to denote a not out score (these are in E5, K5, Q5, W5 etc.)
I can sort out a formula to find the highest score (from D5, J5, P5, V5) and place this high score in a cell elsewhere - but what I really need to do is to check if the high score is not out by looking to see if there is an asterisk in the adjacent cell, and then place the score AND asterisk in another cell.
s/s is 325501 rows deep. Column C contains names. Column J contains scores. I need column N to give me the highest score a name has previously achieved. (please see small attachment for illustration). If i can get a formula then I can fill this down.
View 4 Replies View RelatedI have 2 columns, A (has the names of employees) and B (has the month in which the employee has a project scheduled). What I’m looking to do is find the latest month an employee has a project scheduled. Note: Employees can have a multiple number of projects so they may be listed multiple times with corresponding months.
I have each employee listed in column F and am looking to find their latest project month in column G. (I have the number that the formula should return in column H).
Is there a formula I can use to find the Highest and Lowest value in a column?
View 9 Replies View RelatedIn sheet 1:
I have a list of customers and their current credit limit
In sheet 2:
i have a list of all payments received in the last 12 months.
my customers credit limits are set by multiplying their highest payment in the last 12 months x 1.25
(e.g. payment of $1000 x 1.25= limit of $1250)
what i want to do is:
1) look at the customers in sheet 1
2) check sheet 2 to see if they have made a payment
3) return their highest payment (if any) in sheet 1 Col. C
4) i can work out the rest
I have a workbook that contains sheets of sales data from year to year. Each sheet has the same data in the same range of cells. For example b2 thru b26 would contain the sales for Day 1 of a route system for each week of the year, and each sheet in the workbook contains the same data in b2 thru b26 regardless of the year (2006, 2007, etc). I would like to be able to have a cell that would contain the record high sales for that particular route day, but have a formula that would watch that column and change the value in the selected cell when a new high was entered.
Is there a way to check the range of cells for a high value, or would I need to check each cell against the current high value in the cell with the record high, and how would I go about constructing this formula? Or as I'm now thinking about it, would this be more of a job for a macro that would run when data was entered?
I have two groups of numbers. The first group is x amount of rows and each row has 6 numbers. The second group is x amount of rows and each row is 7 numbers.
Each number from the first group needs to check to see if it exists in the second group. If it does exist, the cell should change to a highlighted cell, or switch to an 'X' or something else that identifies it has been matched. Note: Numbers may be duplicated in both groups. Is there an easy way to do this, or will it involve programming? I'm attaching an example of the "group" setup.
I have several worksheets where I input data, and I would like a 'stats' page as worksheet 1. Work sheet one is a list of names in cells A4:A28. column B,C,D,E,F, and G contain the results using Countif. How would I now get excel to look down a column, for example B, to find the highest number in that column and then use the name from that line but in column A.
View 3 Replies View RelatedI am trying to work out how to select a range from a formula.
One formula works out when a specific number in a list of rows is reached, and returns the number of values it counted before it reached the number.
MATCH(TRUE,INDEX($A$2:$A$50>=B1,0),0)
With the figure returned from that can I then select the range from the first row, to the number of rows counted. And with that selection find the highest number within that range, specifying the highest number as the result?
In have a worksheet with about 5,000 rows. In column there is a unique identifier for each row, however the unique identifier can take one of 12 different formats, namely:
L1314LAND00001 through to L1314LAND0XXXX
L1314CUST00001 through to L1314CUST0XXXX
L1314COMM00001 through to L1314COMM0XXXX
M1314LAND00001 through to M1314LAND0XXXX
M1314CUST00001 through to M1314CUST0XXXX
M1314COMM00001 through to M1314COMM0XXXX
N1314LAND00001 through to N1314LAND0XXXX
N1314CUST00001 through to N1314CUST0XXXX
N1314COMM00001 through to N1314COMM0XXXX
S1314LAND00001 through to S1314LAND0XXXX
S1314CUST00001 through to S1314CUST0XXXX
S1314COMM00001 through to S1314COMM0XXXX
These unique identifiers won't always appear in sequentiual order. In Cells B2 to M2, I want to be able to determine what the next entry for each of the twelve variations will be, so for example, if the current highest value in column A for the 'S1314LAND' range S131400421, in cell K2, I would want it to display S1314LAND00422, and if the current highest value in column A for the 'M1314CUST' range M1314CUST0036, I would want cell C2 to display M1314CUST0037, so anyone at a glance can see the next highest unique reference for the relevant set, rather than having to go through the unique identifiers in column A manually to determine the next entry in the series.
I'm not really sure where to start, when there can be more than one aplhanumeric entries ending in the same number, e.g. S1314CUST00500 and M1314LAND00500.
In the attched sheet I have a list of employee ID's in column A and the Employee's Line manager ID in Column B. In Column C I need the Line Manager at the top of the pile so to speak. These line managers are listed in column J (J2:J6)
At the moment I have been writing formulas accross 11 columns (there are 11 possible levels) to check the line managers ID in Column A and see if their line manager is in the top manager list, I do this formula for all 11 columns until the line manager in the list is found. If the Line Manager is in the list I simply repeat it for the next columns. The end result is that in the 11th column all employees will have one of these Line Managers from the Top List in their row.
Is this possible to do through VBA? I have thought about how I could do this through VBA but I have just hit a brick wall.
I'm not asking for someone to do all of this for me but if someone could give me a couple of hints around how to look up a value in a list through VBA and if it is even possible to repeat that process per line until the match is found, that would be great.
pictorial representation find highest in the cell
data & output
trying to put a formula in to find the true value of cells, i.e.
need the positive value of these cells (into one cell), note below, assume colume A1-A6.
FALSE
FALSE
FALSE
35
FALSE
FALSE
I have two sheets:
Sheet one has dates, my prices on each of those days, and the fields h1 h2 h3 h4 (h1 is the closest higher number, h2 is the next closet higher number, etc.) and l1 l2 l3 l4 (l1 is the closest lower number, etc. etc.)
Sheet two has certain dates and prices of a competitor's prices.
What I'm trying to do is two things (see attached):
1) find the four closest higher and four closest lower prices (if available)
2) use only the prices that are on or before the date in question.
I've tried combinations like LARGE and OFFSET and so far it is not getting me anywhere.
Can this be done???
I'm trying to use the following formula to verify if the "," is within a cell. Something is not right, because even for True conditions, I'm getting a False return. I think my True logical test is not written right.
View 3 Replies View RelatedI’m putting together a blackjack odds calculator. I could use some help with a formula. If I have an A,7 (ace low) it needs to return a 0 (or false) for a “Possible Hand” because further down the column A,7 (ace hi) has a true “End Hand Total”
I was going to use an IF and a VLOOKUP (looking lower on the column), but then I cannot sort the column. Is there a formula that will find the hand and check for true 2 columns over from identical hand. There are 169 starting hand combinations. The attached worksheet only has 31 – for simplification.