Finding The Maximum Number Before A List Turns Negative
May 21, 2009
i have the volume of a reservoir in column A for lets say, 2 years, with monthly data (so 24 numbers in my list)
I also have some variables that feed into this list such as rainfall (fixed), and population (i.e water use, which i can manually change)
if i increase the population too much, the volume of the reservoir will at certain times of the year, fall into negative digits.
what i'm looking for, is a cell which works out the maximum value (in whole numbers) for my population, without any of the numbers in the reservoir volume list falling below zero.
View 9 Replies
ADVERTISEMENT
Jul 6, 2009
selecting a range under a condition. I'd like to write a macro to find the maximum value for a certain ID. The number of ID rows (left column) is unknown so can't say range("A1:A5"). Then have the ID and max number shifted to another column. Maybe use 'rows.count' ?
Eg.
4009 5
4009 9
4009 8
4009 4
4005 7
4005 3
4005 9
3008 10
3008 11
View 9 Replies
View Related
Nov 25, 2006
a spreadsheet in Excel. I have names with scores. Then I have the winning score. I need a formula to find the score closest to zero and to display the name of the winner.
Ex: Names A1:A4 and Scores B1:B4. Winning Score in B6 and list name in B7.
Ana 16
Bob 2
Charles 8
David 11
Winning Score 10
Answer should be 11 which is David, since David is only -1 away compared to the others.
View 9 Replies
View Related
Jul 6, 2007
How do I create a formula that tells me if a negative number appears in a column.
for example, the following numbers are in cell A1:A5
10
15
-1
12
8
I need a formula in B2 that tells me if A1:A5 contains a negative number.
View 3 Replies
View Related
Dec 2, 2006
My spreadsheet contains a tasklist. It is generally sorted by priority (number); each row also contains a task ID ("T0100"). When I add a new task I need to know the last used task ID so I can assign the next one.
I've tried various built in functions but each expects numbers.
How can I insert in a cell (or display in a msgbox) the maximum text value?
For example, Given the data below I'd like to have show "T0888".
PRI TASKID
0 T0123
0 T0199
0 T0101
1 T0888
1 T0105
View 3 Replies
View Related
Oct 23, 2008
I was hoping that my formula would give me the count number based on the Maximum time (latest time) and the Name field...My result is a 0 instead of 62 (the correct answer).
=SUM((Download!$H$2:$H$10=A4)*(Download!$D$2:$D$10=MAX(IF(Download!$H$2:$H$10=$A4,Download!$D$2:$D$1 0)))*Download!$I$2:$I$10)
Would a Index/Match/MAX function be more efficient?
View 4 Replies
View Related
Jan 26, 2014
I need a formula in order to find each time the maximum value.
View 3 Replies
View Related
Nov 12, 2008
Very simple problem. I need the second highest value in an array. Max gives me highest. Min gives me lowest. I need a kind of a MAX2 function.
View 3 Replies
View Related
May 16, 2009
i have a table same this in 5000 rows and 10 columns that are years from 1998 to 2007. ISO2 is two digit names of countries.
ISO2 D1998 D1999 D2000 D2001 D2002 D2003 D2004 D2005 D2006 D2007
CL 135 147 180 192 48 629 494 137 135 359
CL 132 145 177 190 45 623 491 134 132 356
CL 129 141 174 186 42 617 488 131 129 353
EC 126 139 171 184 39 611 485 128 126 350
EC 123 135 168 180 36 605 482 125 123 347
EC 120 133 165 178 33 599 479 122 120 344
KH 117 129 162 174 30 593 476 119 117 341
KH 114 127 159 172 27 587 473 116 114 338
KH 111 123 156 168 24 581 470 113 111 335
PH 108 121 153 166 21 575 467 110 108 332
PH 105 117 150 162 18 569 464 107 105 329
PH 102 115 147 160 15 563 461 104 102 326
PH 99 111 144 156 12 557 458 101 99 323
VE 96 109 141 154 9 551 455 98 96 320
i want a macro to advance filter column A and make a unique list of it and then find the maximum value of each country in column A in 10 years. for example final table for country "CL" must be same this
ISO2 D1998 D1999 D2000 D2001 D2002 D2003 D2004 D2005 D2006 D2007
CL 135 147 180 192 629 629 494 137 135 359
View 3 Replies
View Related
Jan 26, 2010
I have to sets of data, each in a sheet with the first column as identical for both sheets. Sheet2 contains two series of 6 rows, each for a specific first column (""B Code").
Now I want to find the values of "TCT-C" column in sheet1 (for each range of 6 rows that the "B Code" is match) which corresponds to the row number that "TCT" in sheet2 is maximum (again for 6 rows). The point is, I need to shift to another series of 6 rows in sheet2 once the "B Code" does not match.
View 9 Replies
View Related
Feb 2, 2006
I have a row of data with the cells I want to find a MAX for are separated from each other:
a1=300 d1=500 g1=800 j1=10,000
I want to find the MAX value for a1,d1,g1,j1, but exclude any value over 1000. So instead of =MAX(a1,d1,g1,j1) returning 10,000, =???(???) will return the next highest max of 800.
View 14 Replies
View Related
Feb 12, 2007
I have a range of overtime data. I want to list the maximum occurrence of first 10 overtime data ( Like 3200,2950.2300....etc) Thereafter from the results obtained I need to know the cell address of the employee corresponding to the results obtained, i.e XYZ, ABC.....
A B
Employee Name OT Amount
1. XYZ 3200.00
23. ABC 2950.00
35. WER 2300.00
View 10 Replies
View Related
Dec 11, 2008
Say I have 2 columns that in basic form look like this:
Column A Column B
Jan 1
Feb 0
Mar 7
Apr 4
May 15
Jun 2
Jul 5
Aug 4
First I want to look up the max value in this column. This is easy =max(b1:b8)
Then I want to know the minimum value that occurs after the maximum value. Thus the answer would be 2.
View 3 Replies
View Related
May 7, 2005
Problem:
Range A2:C10 contains the login and logout times of various ID's.
Each ID could log in and out a number of times a day.
How could we find the first time a specific ID logged in and the last time that same ID logged out?
Solution:
For each of the ID's in range A2:A10, enter two Array Formulas.
To find the first login time (Column B) enter the following formula:
{=1/MAX((A14=$A$2:$A$10)*($B$2:$B$10
To find the last logout time (Column C) enter the following formula:
{=MAX(($A$2:$A$10=A14)*($C$2:$C$10))}
ID______Login Time______Logout Time
1 ______02:40___________03:10
2 ______00:15___________03:20
1 ______06:20___________09:30
3 ______09:14___________11:05
4 ______11:00___________19:30
2 ______04:05___________06:55
3 ______12:08___________17:17
1 ______10:00___________16:20
2 ______08:12___________12:33
ID______First Login Time______Last Logout Time
1 ______2:40__________________16:20
2 ______0:15__________________12:33
3 ______9:14__________________17:17
4 ______11:00_________________19:30
View 9 Replies
View Related
Aug 6, 2013
I am now working on an excel spreadsheet which will automatically update every day so that one row will be added on the top of the sheet everyday.i.e.
A1 Date Price
A2 (New row added,date) (New row added,price)
A3 16/1/2013 5.5
A4 15/1/2013 5.6
A5 14/1/2013 5.45
... ...
Assuming that I am looking for maximum value of the column "Price", since max() cannot be applied to variable range, is there other method I could useto look for the most updated maximum value of column "price"?
View 9 Replies
View Related
Mar 21, 2014
I am writing a formula for finding a maximum out of three average values. The cells that will be populated with data are A1 to A5; B1 to B5; C1 to C5. The final cell where I want to write the formula needs to show the maximum of the three averages (average of data in each row).
The difficulty is that sometimes only the A and B rows are populated (and sometime only A row is populated) and if B and/or C are blank, the formula fails and shows "#DIV/0!".
How can I write so that if C is blank, then evaluate only A and B data. And If both B and C are blank, then just display the average of row A.
View 3 Replies
View Related
Nov 7, 2008
This should be simple to do but I can't figure it out. I have a database that lists operating room numbers in one column and the length of the surgeries performed in those rooms in another column.
I need a formula that will give me the longest OR time for a given room. For example the room numbers are in column A and the OR times are in Column B. I've tried something like
View 6 Replies
View Related
Jun 15, 2009
I’m trying to figure out how to show the highest occurrence of text in 10 cells which are not next to each other. Some of the cells will also be blank And the other thing is if there is a draw e.g. 5 2Z and 5 1Z I'd like it to show that, either with a word e.g. "DRAW" or anything really other than just putting whichever of the 2 "notes" in it feels like
Attached is a spreadsheet (all other data deleted) that shows what I am wanting to do – I have typed the results I am after directly in to the cells in columns BE & BF – BE will need some kind of countif, but when I try that is says I have too many arguments! I have to leave the columns in between blank in this case as they have other info in them, which is really annoying as if those 10 cells were contiguous then the formula
View 3 Replies
View Related
Nov 14, 2012
i have product group,product name and the statistics. I'll use an example of students with score. I have these set of data:
A B C D
1 Student Name Score Sum
2 Student1 Anna 48 80=Sumif(A:A,A2,C:C)
3 Student1 Anna 32 80
4 Student2 Tom 30 80
5 Student2 Tom 30 80
6 Student2 Tom 20 80
7 Student3 June 55 60
8 Student3 June 1 60
9 Student3 June 4 60
Now we have 2 students with tied highest scores with 80 Scores. Naturally i want the rank to be as follow: Top1 Anna since she has the highest score "48", and Top2 Tom, and Top3 June.
The problem is, the score data can vary and Top3 can probably have the highest score and he still didnt make the highest score collectively. And there will also going to be other situations as well because im working on a very large data set, and not these 3 students.
the max score is tied, and since im making another column with sum scores, the data is going to be redundant, and hopefully theres a formula to ignore this.
View 2 Replies
View Related
Aug 25, 2014
Please find the attached MS Excel 2010 file <average set.xlsx>.
There is set of positive set & negative set of values available in the Column A. The values are plotted against Column A in Column B. Light green are positive sets and light yellow are negative sets.
Now I want to calculate the average for the positive set & negative set of values as shown in light majenta in the cells F4:F9. Also all majenta cells to be plotted by formula.
The Column H and Column I also same as like above , but here negative set of numbers starts first.
View 4 Replies
View Related
Aug 21, 2014
I go negative in one column I want it to show up in the next column as a positive number because when I add my income and subtract my bills and the negative from last month to get the what cash I'll have left it screws up because negative subtract a negative is a positive. So how do i get the sum of say B9 to from -$5.00 to +$5.00 into C4 so when i subtract C4 From my income it wont add to it.
View 1 Replies
View Related
Apr 9, 2008
I have a list of data for a frame in a building. I used these forums to come up with a sort that will take the data and put in on seperate sheets based on the floor of the building. I need to now go through each "floor sheet" find the maximum values and paste them onto a Report sheet. This has to be done within a macro stored in my Personal.xls folder as the file with data is coming from another program and is always changing. Also, the sheet names wont always be the same as the format might be different like third, or 3rd, or "third". Here is the code for the sort macro, I am sure some of you will recognize it:
Public Sub Unique_Record_Extract()
'extracts unique records from Column A and copies those records to a new worksheet
Dim My_Range As Range
Dim My_Cell As Variant
Dim sh_Original As Worksheet
Dim Cell_Sum As Long
Dim i As Long
'turn off interactive stuff to speed it up
Application.DisplayAlerts = False
Application.Calculation = xlManual
Application.ScreenUpdating = False
'Delete All Blank rows if cell in column A is blank
On Error Resume Next
Range("A:A").SpecialCells(xlBlanks).EntireRow.Delete
ActiveSheet.Name = "MainSheet"............................
View 6 Replies
View Related
Mar 9, 2013
I would like to add to this formula.... if the result of "$L$6-Q15", from below, is 0 or a negative number, then the desired result would be 0 for this formula.
Possibly wrapping IF AND somewhere in this...
=IF((O15+(K16*$L$5))>=$L$6,$L$6-Q15,K16*$L$5)
View 2 Replies
View Related
Aug 15, 2007
This may sound simple, but is not (it might be easy for you hopefully)...... I have a string of numbers and the first few numbers can be either postive, negative or zero....Later on, the numbers all become negative......
I need to find the the cell which contains the first negative number in the consequtive negative numbers.....The difficult part is the numbers before the consequtive negative numbers can be anything......
View 9 Replies
View Related
Jan 2, 2008
is there a way to format a cell that will make the number a negative number regardless of what number I type; whether I type a positive or negative.
What i'm trying to accomplish is enter a number and the number will be negative. I don't want to have to type a negative in front of the number.
View 9 Replies
View Related
Apr 24, 2007
I am using Excel 2003 and have a spreadsheet that lists 1521 fonts. I am using VBA and looping through the list of font names in column 1 and want to put an example of the font in column 2. I am trapping for error 1004 and using Resume Next. This works fine for 480 lines and then it just stops working. No error message or anything. The only thing I could think of is there might be a maximum number of fonts allowed per spreadsheete, but I would have though I would get an error.
View 3 Replies
View Related
May 20, 2006
i need a self correcting formula to solve the following case:
In column A in 7 rows:
5
-9
3
2
-4
-7
1
I want to extract the positive numbers to column B in the amount of positive number rows(no skipped row/space):
5
3
2
1
So it would look somthing like this:
A B
5 5
-9 3
3 2
2 1
-4
-7
1
Is there a simple formula to do this? I have been doing IF functions but it is taking too long. And I have got the results I wanted.
=IF(A1>0,A1,"") ==> works
but I want the numbers to be one right after the other (no blank rows in between).
View 9 Replies
View Related
Jul 12, 2008
NameTime InTime OutAlan08300930Alan10001030Alan12301630Tony11301230Alan09450950Tony10301115
I would like to find the minimum time in and maximum time out for each person. The data type of Time In and Time Out are general.
I.E
NameTime InTime OutAlan08301630Tony10301230
Therefore, I would like to know what function in excel will enable me to perform such task. Furthermore, can this function use with VBA?
View 9 Replies
View Related
Feb 13, 2010
I have rows of 10 keywords. I want the macros to compare the first row against all the rows except itself, then compare the second row against all the rows except itself, the third row against all the rows except itself, basically looking for duplicates...It will then record in a column for each respective row, the max # of duplicates found with another row..
For instance lets say I was looking at the 15th row, and it looked for duplicates elsewhere. It only found duplicates in the 4th row and the 5th row. In the fourth row, there were 5 keywords common, and in the 5th row there were 7 keywords common. Therefore the max # of common words is 7 for the 15th row, and that is what is recorded.
In addition the number of rows will probably vary it could range from 1 to 500. I included an excel spreadsheet that has visually speaking how this could work, maybe using COUNTIF. Basically it counts the # of common keywords for one row with all the other rows, pastes the count #s to the right, then finds the max of those count #s, copies the max into another column, then clears the count #s, and looks up the next row, repeats the same process. It is easier probably if you look at the attached spreadsheet to get an idea of what i am talking about..
View 9 Replies
View Related
Oct 27, 2009
Is there a way to a formula that would show the following? A plus B = C but if A is below 0, stop the value at 0 then add column B:
Columns:
A B C
-2 5 5
1 5 6
0 5 5
View 2 Replies
View Related