Finding Row Number Within Range With Conditions
Dec 7, 2006
In the screen shot I'm trying to find the row number where a particular price of an order has been reached. In this case, for the first order, my execution price is 1.8859, my stop loss is 1.8834 and take profit is 1.8884. I need to look and the future prices to determine which event had occured first (either the take profit or the stop loss). I though by using row numbers I would compare and which ever is smallest would mean that it occured first - the profit/loss is then calculated.
The other caveat is that an exact match may not always be available - for example, the second trade is stoped out because the highest price for the 12:35 timeframe exceeds the value I'm looking for. Still it would have triggered a stop loss.
******** ******************** ************************************************************************>Microsoft Excel - Misc.xls___Running: xl2002 XP : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutH6I6J6M6H7I7J7M7H8I8J8M8I9J9M9I10J10M10I11J11M11I12J12M12=
ABCDEFGHIJKLM3DateTimeOpenHighLow*Order*PlacedOrder*PriceStop*LossTake*ProfitStop*Loss*Row*#Take*Profit*Row*#Profit/Loss42006.11.1512:001.88651.88661.8863*N***these*are*the*cells*that*need*the*formula*52006.11.1512:051.88651.88661.8856*N******62006.11.1512:101.88591.88591.8857*Buy1.88591.88341.88841080.002572006.11.1512:151.88581.88591.8853*N*...............
View 10 Replies
ADVERTISEMENT
Jan 22, 2013
Excel 2007
ABCDE12145101843222121028543291410388563015104796731501058178325210
685894953107839104354108841011445510985111349661101215516710013135668
981417576999151858708916195971801720607291182161738219236274902024637
59121276476872228657786232425Sheet1
View 7 Replies
View Related
Aug 25, 2006
Designated Cell = 7
1 10 .034
15 25 .072
35 45 .089
Output Cell = ???
I am trying to find a formula for the output cell. Suppose the designated cell = 7 due to formulas above it. So that number is always given but can change. I then need a formula for the ouput cell that says if the designated cell is greater than or equal to 1, and less than 10, then the output cell should equal .034. So suppose the designated cell = 18.2. Then I would want the output cell to be .072 since it is greater than or equal to 15, and less than 25. The template I am using has 23 rows of numbers like above. I didn't know how to do it for 23 rows though. If/Then doesn't work because it is 23 statements long (well over the seven limit) and the vlookup only works when the cell is equal to a number and not a range.
View 9 Replies
View Related
Dec 23, 2006
i'd like to find a value, for example, 9, in another column. in the other column it might have 9, or it could have 7-10, 8+, 9-11, etc. is there anyway i can fix my formula to account for this?
i'm using the following: =LOOKUP(9.99999999999999E+307,SEARCH(A11,J4:J32),O4:O32)
A11 is my value, aka 9
J4:J32 is my "other column"
O4:032 contains the value i want returned
it could be any value, but it's always i number i have to look up. can anyone please let me know if there's a way to do this?
View 9 Replies
View Related
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 3, 2009
So this is something that I'm not sure is possible in Excel. I would like to use an "if,then" statement to see if a number is in multiple cells. I know this is usually very simple except there's a catch here. In each cell there's a number range using a "-". So in a single cell a range would be 301-305. I am open to having the range done a different way like 301,302...etc. I just decided this would be an easy way to look at it and was hoping to find a way to solve this problem with leaving in the dash. Whatever is practical is fine with me.
Using Example A in the attached file I want to use this statement, =IF(308 is in any of the ranges in A3:A6, TRUE, FALSE).
So, for me, the alternative I want to avoid is Example B where I would have to list every single number and then check the whole range. I would like to avoid this because these examples, as you can imagine, are on a much smaller scale then what I will actually be dealing with.
View 11 Replies
View Related
Aug 15, 2014
It is about finding the number of unique items in a range that contains empty cells.I can intuit the form of this:
Formula:
[Code]....
And many of the variations of it when there are no empty cells in the range.
For a range of that contains empty cells I've tried this:
Formula: [Code] .....
And variations of it. It does not work, and I don't know why...............however..........
I ran across this on another [SOLVED] thread and it does work:
Formula: [Code] .....
I would have never considered this plausible. What is the magic behind appending an empty string to the criteria in the COUNTIF function?
It strikes me that this strategy likely has application elsewhere, too.
View 14 Replies
View Related
Jul 15, 2006
I'm not sure if this is the best way to accomplish this task, but I've been trying to use countif to calculate the total of column C in my data based on the conditions that its respective cell in column A must be found and that column B must be yes. I can't use countif as it doesn't allow criteria relative to cells. Is it possible to use SUMIF?
View 3 Replies
View Related
Nov 20, 2009
I am using EXCEL 2003. I am to find Average using few conditions. I have explained the requirement in the sample workbook.
View 7 Replies
View Related
Jan 6, 2014
Current simplified situation:
Department A
Employee_1
Employee_2
Employee_3
(empty cell)
Department B
Employee_4
Employee_5
Department C
Employee_6
Employee_7
Employee_8
Employee_9
Employee_10
With the VLOOKUP function, I have looked up the row numbers of the departments. Subsequently, I'd like to find the last employee of that department, based on the department's name and/or the department's row number.
A department-typed cell is non-empty and never contains an underscore. An employee-typed cell is non-empty and it always contains an underscore.
The simple and non-sufficing formula is the VLOOKUP of the row number of next department minus one. But with adding, moving and subtracting departments rapidly, this is not an option.
View 4 Replies
View Related
Mar 23, 2009
I want to populate separate tabs from data in a master table based upon multiple conditions shown in the separate tabs. Each tab is a summary of a particular engineer's shifts over multiple weeks and their results on various projects. Each summary tab has the engineer's name and the number of the week (the two conditions). Example: On Aaron's tab, I want to show a summary of Aaron's work and his results over a period of several months, as well as who is working the other shift on that day for those projects. So I need to get the following information for Aaron's tab from the master table:
Week 1, Aaron is working the morning shift and Zeb is working the afternoon shift,
Week 2, Bill is working the morning shift and Aaron is working the afternoon shift
Week 3, Aaron is working the morning shift and John is working the afternoon shift
etc etc
I also need to know how much work each engineer pairing has achieved in a particular week on a particular project. The engineer working in each shift may vary from week to week, as will their results. There is no formula for when a particular engineer will be working either morning or afternoon or whom they will be working with.
View 5 Replies
View Related
Oct 26, 2006
Problem : Belgium has three types of phone numbers
##/###.##.## (if prefix is "02" or "03")
####/##.##.## (if prefix is "04##")
###/##.##.## (everything else)
depending on the prefix.
How can I put a conditional number formatting on a cell, so that it puts the input (eg. 025648595) in the correct format (in this case : 02/564.85.95, or something along these lines)?
View 9 Replies
View Related
May 9, 2012
I need to count all the cells in columns H, I, and J that contain a number either less than -.5 or greater than .5.
Separately, I also need to count all the cells in columns H, I, and J that contain a number either less than -.5 or greater than .5 if the corresponding cell in column G is not empty.
View 1 Replies
View Related
Apr 1, 2007
I am trying to create on excel order form. I want customers to be able to input the item # (a range from 1 to 12), then I want the to price to be calculated based on the item # they input.
For example. If they choose item #2 in A6 then the price in F6 will be recorded as $8.00. (the price would change for each item # they input).
the formula I started out with was:
=IF((A6=1),"$8.00")
this worked for me if A6 did in fact equal 1.
So I tried adding this equation to the formula.
=IF((A6=1),"$8.00")*OR((A6=2),"$7.00")....this would continue on. I even pressed "command return" after the statement as if I was entering an array formula.
I got the error #VALUE!
View 9 Replies
View Related
Dec 1, 2008
I am trying to find the percentage in a column that is used the most. I know =MAX() finds the maximum number but I need the one that is used the most and if there are 2 that are the same, I need the greater of the two.
View 9 Replies
View Related
May 19, 2007
I am trying to find the next cell in Column C that contains a value. Please see attachment.
ie.
I need a formula in cell E7 that will find the next number in Column C after the row it is in (ie. the number "2" in cell C9). E7 should then return the row number (ie. 9).
View 9 Replies
View Related
Aug 5, 2014
I have attached xl sheet for ref.
I have value in E2(5),F2(10)=G2(5[sub of F2-E2])
I need to find E2(5) value in B2:B21 and the same of F2 also
After finding that
(eg): E2 value 5 present in B6 cell and it should come to c6 cell same of F2 also
Now It should select C6 to C11 cells.(ref of B6 to B11,ie,5 to 10)
I tried in vba and formuals but i couldnt find solution.
View 6 Replies
View Related
Apr 12, 2014
I'm trying to count the number of occurrences where two conditions in a table are true.
I have a table that has two columns for ratings; impact and probability. Each can be scored 1-5 This creates a matrix table of possible scores from 1 - 25 (image attached)
I want to COUNT the number of items in each of the boxes (not the total score). For example, how many are Impact 5 and Probability 5 (25 total); how many are Impact 4 and Probability 2 (8 total), and so on. Basically a count of the each of the intersections in the matrix.
Something like "Countif Impact is 5 AND Probability is 5"
Is it possible to count something once, checking for multiple conditions?
View 2 Replies
View Related
Mar 23, 2014
The formula below works fine except for,E3,F3,G3,H3,I3. They work great if I was on ROW 3 but A2 could take me to ROW6.
=IF(ISERROR(VLOOKUP(A2,Players!B:B,1,FALSE)),"", SUM(IF(Players!E3="y",Players!$T$5,"0")+(IF(Players!F3="y",Players!$U$5,"0"))+(IF(Players!G3="y",Players!$V$5,"0"))+(IF(Players!H3="y",Players!$W$5,"0"))+(IF(Players!I3="y",Players!$X$5,"0"))))
View 5 Replies
View Related
Feb 2, 2006
I have a hockey scoring sheet, which has player names, goals and assist with it. What I want to do, is to print in to a different sheet player's name and goal amount, who has scored the most goals.
Example of a scoring sheet:
View 11 Replies
View Related
Feb 9, 2012
On Sheet1, I have 6000 rows of Data of which Columns B (ID) and D (Date) are needed to locate the row number on Sheet2.
Sheet2, Column A will correspond to ID and Columns C and D are start/end dates.
I am looking for a calc/function that will locate the row in which the ID matches column A and Date falls on or between the dates in C and D...as I will need the value in Column E of that row.
View 4 Replies
View Related
Jul 31, 2014
I'm trying to extract the number portion from the following string. I'm trying to use FIND to find the first digit between 1 and 2 so I used an "or" argument along with the code number, however it's not working here. What I really want to do is find any digit between 1 and 9 in the string, however I started with this formula for now. why this doesn't work and provide a better formula. I want to understand why this didn't work to understand the functions better. Text string is as follows "standard VAT rate: 20% (Jan 1984)". The formula I used in the following =MID(A253,FIND(OR(Char(49),CHAR(50)),A253),2) where A253 contains the string. Is it possible to use a logical argument within a find?
View 7 Replies
View Related
Dec 10, 2008
I have an excel file which contains 59058 numbers ranging from 1 to 70 arranged in a matrix so they are from A1 to Q3474.
I need to find the most frequent number, the second most frequent, third most frequent and so on to the ninth most frequent number.
I am aware of the MODE function, but that function has 2 problems, it can only handle 255 numbers, and it only shows the most frequent number, and I'm also interested in the second most frequent number and so forth.
View 9 Replies
View Related
Mar 3, 2009
I need to scan a list of numbers and find the nearest number to say 80... ex
1
50
23
43
79
102
The formula would tell me the closest number is 79.
View 9 Replies
View Related
Apr 8, 2007
We are trying to make either a macro or a function that will look through the contents of a cell, find the first NUMBER and then paste the results to another column. Below is an example of what may be in cell A1:
#BC7K,03/30/2007,0.00636,0.0069,0.00614,0.0062,0.0,0
We want only to find the FIRST NUMBER in this string, so the result should be 7.
View 5 Replies
View Related
May 16, 2014
I've been desperately trying to figure out a formula that allows me to count the number of rows in a column that have different values, but that only counts those rows in which other conditions have been met. Probably sounds a little confusing, which is why I'll illustrate it with a screenshot:
The file contains a listing of major executives of a variety of different firms in different years from 1992 onwards. In the screenshot for example, you see the executives of AAR Corp from 1992 to 1997. Since my file however consists of 240,000 rows, there's a number of c. 2400 firms with their executives over a time period of 20 years each. Since not necessarily all executives remain with their companies for the rest of their lives, some executives show up for a number of different firms in my sample.
I want to determine at how many firms each executive worked within his current industry up to the respective year, based on the information of the 2400 companies and executive data over 20 years. The current industry is classified by 1 digit SIC codes (column U) and each firm has an individual firm identifier which is the CUSIP in column S.
For example, when applying this to the first row in the screenshot (Ira Eichner), I would need a formula that counts the number of different CUSIPs (thus firms), given that the EXECID (executive ID, identifier for each executive; column I) equals 9248, the 1 digit SIC code (column U) equals 5, and the Year (column J) is below 1992.
View 7 Replies
View Related
Apr 22, 2014
I have used Formula to ID cells containing a formula to flag cells red with conditional formatting in a list that do not have formula.
I need a single cell to change colour if any of the cells in the list do not have a formula. e.g. the subtotal in the top row could go red so the user can scroll down to find individual red cells.
Is there a way to count the red cells without formula in the list - Conditionally formatted cells are hard to count. I don't want to use a vba script to do it as the user probably won't run it and auto run slow calculations down.
Is there an array formula that can return true or false if not(CellHasFormula) is true anywhere in the list?
countif(AH1:AH2976,CellHasFormula) doesn't work.
View 9 Replies
View Related
Aug 7, 2009
Possible to find the position of the 1st number value inbetween text??
example : GBB_5600_OPP_WNN
View 9 Replies
View Related
Mar 6, 2012
I have created a worksheet that uses lookup for the numbers that are in sequence but am unsure what formula to use when trying to lookup non sequence numbers as shown below.
Sequence No's
Cell A1:A10 would be 1,2,3,4,5,6,7,8,9,10 (as example)
Non sequence No's
Cell B1:B10 would be 2,5,1,7,3,8,4,10,6,9 (as example)
What do I use to lookup, if cell C1 = 1 and needs to find the No 3 from the Non sequence cells?
View 5 Replies
View Related
Jan 6, 2013
I've written this code to find a value in the worksheet chosen from the combo box (I think it works as its doesnt error), but I now need too write some code to pull out the row number from my code and put data into the same row (but different columns). This is my code so far:
Code:
Private Sub BookButton_Click()
Dim rFound As Range[code].....
View 2 Replies
View Related