Get last data formula from column greater is than 1

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,362
Office Version
  1. 2010
Hi everyone,</SPAN></SPAN>

In the below sheet I have formulas and data fill in cells: B2:O20 and cells B21:O21 data comes from another source.</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
1Game1234567891011121314
2JR181
3JR191211
4JR20312
5JR2113
6JR2221
7JR2311
8JR24112
9JR25123
10JR2634
11JR27151
12JR28612
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
Data


I need formula for in cells B22:O22 that can get last data from each column is greater than 1 as shown below</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
1Game1234567891011121314
2JR181
3JR191211
4JR20312
5JR2113
6JR2221
7JR2311
8JR24112
9JR25123
10JR2634
11JR27151
12JR28612
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
2222236
Data Result


Thanks And Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
B27 becomes 2 because the value of B6 (that is, JR22) is 2. Why is that wrong?

I think its because it should only be evaluating JR32 for all returns (thats my understanding)

In that case, one of...
Rich (BB code):
=IFERROR(IF(1/(LOOKUP(9.99999999999999E+307,B2:B20)>1),
  LOOKUP(9.99999999999999E+307,B2:B20)),"")

Rich (BB code):
=IF(COUNTIF(B2:B20,">1"),IF(LOOKUP(9.99999999999999E+307,B2:B20)>1,
  LOOKUP(9.99999999999999E+307,B2:B20),""),"")
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
You can try this too:

Code:
=IF(COUNT(1/(LOOKUP(99^99,B$2:B$20)>1)),LOOKUP(99^99,B$2:B$20),"")

Markmzz
 
Upvote 0
Thank you markmzz, for your kind help your both formula are resulting as required</SPAN></SPAN>
Code:
=IF(COUNT(B$2:B$20),IF(LOOKUP(99^99,B$2:B$20)>1,LOOKUP(99^99,B$2:B$20),"")
Code:
=IF(COUNT(1/(LOOKUP(99^99,B$2:B$20)>1)),LOOKUP(99^99,B$2:B$20),"")

Thank you Aladin Akyurek , for your kind help your one of formula below is giving a perfect result</SPAN></SPAN>
Code:
[FONT=lucida console][SIZE=2]=IF(COUNTIF(B2:B20,">1"),IF(LOOKUP(9.99999999999999E+307,B2:B20)>1,
  LOOKUP(9.99999999999999E+307,B2:B20),""),"")[/SIZE][/FONT]

Thank you mole999, for your kind help problem is resolved</SPAN></SPAN>

I appreciate to all of you for your help and time</SPAN></SPAN>

Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
Upvote 0
Hi, Well after checking thoroughly with real data occurred one more problem </SPAN></SPAN>

Really, I need to get grater than 1 value only from the last used row in this case below last row is A16 </SPAN></SPAN>

If data are find in cells F6, F7, F8 also get last column result grater than 1 in cell F22</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
1Game1234567891011121314
2JR181
3JR191211
4JR20312
5JR2113
6JR22211
7JR23211
8JR241312
9JR25123
10JR2634
11JR27151
12JR28612
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
222322336
Data Result


Can it be eliminated?</SPAN></SPAN>
And get result as shown below </SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
22222336
Data Result


Thanks And Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
Upvote 0
Hi, Well after checking thoroughly with real data occurred one more problem

Really, I need to get grater than 1 value only from the last used row in this case below last row is A16

If data are find in cells F6, F7, F8 also get last column result grater than 1 in cell F22

ABCDEFGHIJKLMNO
1Game1234567891011121314
2JR181
3JR191211
4JR20312
5JR2113
6JR22211
7JR23211
8JR241312
9JR25123
10JR2634
11JR27151
12JR28612
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
222322336

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Data Result



Can it be eliminated?
And get result as shown below

ABCDEFGHIJKLMNO
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
22222336

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Data Result



Thanks And Regards,
Moti

Is the row of A16 given, that is, is it always that row?
 
Upvote 0
Maybe this:

Layout

Game1234567891011121314
JR181
JR191211
JR20312
JR2113
JR22211
JR23211
JR241312
JR25123
JR2634
JR27151
JR28612
JR293
JR3014
JR3111125
JR3212121236
JR33
JR34
JR35
JR36
461412137998761214
22236
*************************************************************

<tbody>
</tbody>


Formula

Code:
In B22

=IF(INDEX(B$2:B$20,MAX(INDEX(($B$2:$O$20<>"")*(ROW($B$2:$B$20)-ROW($B$2)+1),)))>1,
INDEX(B$2:B$20,MAX(INDEX(($B$2:$O$20<>"")*(ROW($B$2:$B$20)-ROW($B$2)+1),))),"")

And copy to the right.


Markmzz
 
Upvote 0
Maybe this: Formula

Code:
In B22

=IF(INDEX(B$2:B$20,MAX(INDEX(($B$2:$O$20<>"")*(ROW($B$2:$B$20)-ROW($B$2)+1),)))>1,
INDEX(B$2:B$20,MAX(INDEX(($B$2:$O$20<>"")*(ROW($B$2:$B$20)-ROW($B$2)+1),))),"")

And copy to the right.

Thank you markmzz, for your kind support your above formula is working like a magic It is giving 100% perfect result of the last entered values when it is grater than 1</SPAN></SPAN>

I appreciate your help and time </SPAN></SPAN>

Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
Upvote 0
Is the row of A16 given, that is, is it always that row?

Aladin Akyurek , no row keep changing from 1 to 20 markmzz’s formula is giving perfect result. Find the last row result when it is grater than 1 correctly</SPAN></SPAN>

Thank you for your interest and help </SPAN></SPAN>

Regards, Moti</SPAN></SPAN>
 
Upvote 0
Aladin Akyurek , no row keep changing from 1 to 20 markmzz’s formula is giving perfect result. Find the last row result when it is grater than 1 correctly

Thank you for your interest and help

Regards, Moti

If the row the following formula...

A22, control+shift+enter, not just enter:
Rich (BB code):
=MAX(IF(ISNUMBER(B2:O20),ROW(B2:O20)))
picks out is the right one...

B22, just enter and copy across:
Rich (BB code):
=IFERROR(IF(1/(LOOKUP(9.99999999999999E+307,B2:INDEX(B:B,$A$22))>1),
  LOOKUP(9.99999999999999E+307,B2:INDEX(B:B,$A$22))),"")
if you are on a post-2003 system. Otherwise:
Rich (BB code):
=IF(COUNTIF(B2:INDEX(B:B,$A$22),">1"),
  IF(LOOKUP(9.99999999999999E+307,B2:INDEX(B:B,$A$22))>1,
  LOOKUP(9.99999999999999E+307,B2:INDEX(B:B,$A$22)),""),"")

Note 1. The foregoing set up is efficient.
Note 2. You can define BigNum as referreing to: =9.99999999999999E+307 and replace this number in the formulas with BigNum, if so desired.
 
Upvote 0
Hi Aladin Akyurek, </SPAN></SPAN>

Enter markmzz’s formula shown below in the cell B22 and copy across O22</SPAN>

Code:
=IF(INDEX(B$2:B$20,MAX(INDEX(($B$2:$O$20<>"")*(ROW($B$2:$B$20)-ROW($B$2)+1),)))>1,INDEX(B$2:B$20,MAX(INDEX(($B$2:$O$20<>"")*(ROW($B$2:$B$20)-ROW($B$2)+1),))),"")


1-Now enter your 1st formula shown below in cell A24, control+shift+enter, not just enter</SPAN></SPAN>
Code:
=MAX(IF(ISNUMBER(B2:O20),ROW(B2:O20)))
</SPAN>

2-Now enter your 2nd formula shown below in cell B24 and copy across O24</SPAN></SPAN>
Code:
=IF(COUNTIF(B2:INDEX(B:B,$A$24),">1"),  IF(LOOKUP(9.99999999999999E+307,B2:INDEX(B:B,$A$24))>1,  LOOKUP(9.99999999999999E+307,B2:INDEX(B:B,$A$24)),""),"")
</SPAN>
Please take a look sheet shown below your formula track in the Cell N24 number 3 which is not find in the row 16</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
1Game1234567891011121314
2JR181
3JR191211
4JR20312
5JR2113
6JR2221
7JR2311
8JR24112
9JR25123
10JR2634
11JR27151
12JR28612
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR33
18JR34
19JR35
20JR36
21461412137998761214
22Resulta22236
23
2416222336
Data


Now for example insert any number in the row 17 cells B17 O17 (I have insert 4 in L17) and see the result below markmzz’s formula result show only number 4</SPAN></SPAN>
But your formula result shows all and change 3 to 4 in cell L24</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
1Game1234567891011121314
2JR181
3JR191211
4JR20312
5JR2113
6JR2221
7JR2311
8JR24112
9JR25123
10JR2634
11JR27151
12JR28612
13JR293
14JR3014
15JR3111125
16JR3212121236
17JR334
18JR34
19JR35
20JR36
21461412137998761214
22Resulta4
23
2417222436
Data


So far I find markmzz’s formula is giving correct result for my need</SPAN></SPAN>


I appreciate you help for looking my request to solve it, and also hope now I have explained my require correctly</SPAN></SPAN>


Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,840
Members
449,193
Latest member
MikeVol

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