Index match help

Virtaava

New Member
Joined
Apr 22, 2018
Messages
4
Help finding values from columns that match criteria.
If cell in J column has value of S find next value B from same column downwards, then find from that row Close add found value to L column below the row that gave signal S OR if the cell in J column has value of B find next cell downwards that has value of B and from that row find Close and add found value to column M below the row that gave the signal.

abcdefghijklm
1DateOpenLowHighCloseSignalPrice of signalS cloceB Close
2
0,9305

<tbody>
</tbody>
3
0,9348

<tbody>
</tbody>
S
4
0,9264

<tbody>
</tbody>
0,9348Value of cell F6 from the calculations
5
0,9338

<tbody>
</tbody>
6
0,9292

<tbody>
</tbody>
B
7
0,932

<tbody>
</tbody>
0,9292Value of F10 From calculations
8
0,9322

<tbody>
</tbody>
9
0,9293

<tbody>
</tbody>
10
0,9146

<tbody>
</tbody>
S
11
0,9114

<tbody>
</tbody>
0,9146

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>
Thank you for your help. I just cant wrap my head around the index match function :oops:
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Welcome to the MrExcel board!

See if these, copied down, do what you want.
Note the error in cell L11. What do you want returned in a case like this where there are no more "B" values below?

Excel Workbook
FGHIJKLM
1CloseSignalPrice of signalS cloceB Close
20,9305  
30,9348S
40,92640,93480,9292
50,9338
60,9292B
70,9320,92920,9146
80,9322
90,9293
100,9146S
110,91140,9146#N/A
12
INDEX MATCH
 
Upvote 0
Welcome to the MrExcel board!

See if these, copied down, do what you want.
Note the error in cell L11. What do you want returned in a case like this where there are no more "B" values below?

INDEX MATCH

FGHIJKLM
1Close SignalPrice of signalS cloceB Close
20,9305
30,9348 S
40,9264 0,93480,9292
50,9338
60,9292 B
70,932 0,9292 0,9146
80,9322
90,9293
100,9146 S
110,9114 0,9146#N/A
12

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:56px;"><col style="width:17px;"><col style="width:17px;"><col style="width:17px;"><col style="width:56px;"><col style="width:90px;"><col style="width:69px;"><col style="width:60px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
L2=IF(J1="S",INDEX(F3:F$20,MATCH("B",J3:J$20,0)),"")
M2=IF(J1="B",INDEX(F3:F$20,MATCH("S",J3:J$20,0)),"")

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


Sorry about this I probably didn't make my self clear enough in the first post.

So the column J the S and B signals can come in any cell in that column and the rows that are currently in my sheets is about 6000. I get everyday new row with data to columns a to f. and if the calculations in G H and I are true the can generate new B or S signal to Column J
And for the error message blank if there is no signal.
 
Upvote 0
So the column J the S and B signals can come in any cell in that column and the rows that are currently in my sheets is about 6000. I get everyday new row with data to columns a to f. and if the calculations in G H and I are true the can generate new B or S signal to Column J
I'm not sure what you are saying. Does my formula produce incorrect results? If so, which cells are incorrect and exactly what results should show in what cells?
 
Upvote 0
I'm not sure what you are saying. Does my formula produce incorrect results? If so, which cells are incorrect and exactly what results should show in what cells?

Sorry your formula is working fine. I just got #name ? error. My excel is in Finnish so it did't understand the formula i had to replace IF with JOS, INDEX with INDEKSI, MATCH with VASTINE and , with ;
Now it's working fine. thank you for your help.
 
Upvote 0
Ok the formala is working witout errors but it is giving wrong information.
maybe picture will help because i can't post attachments. https://imgur.com/a/Wk3CBRf

So if B signal find Close value of next S signal.
And if S signal find next B signal close value.

Thanks


Wk3CBRf
Wk3CBRf
 
Upvote 0
I can't see all of your formula but when I first replied, you didn't say that you had 6000 rows and showed 11 so I used $20 in my formulas. That 20 needs to be a row number greater then the last row of your data. So perhaps change to $7000 to be sure then copy down. Also make sure you have the $ signs in the right place.

"i can't post attachments" Nobody can, but see the link in my signature block below for suggestions for posting small screen shots, including formulas (like mine in post #2 above).
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,580
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top