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>
 
Try this

=IF(ISERROR(LOOKUP(10^100,$B$2:$B$50)<=1),"",LOOKUP(10^100,$B$2:$B$50))

Thank you mole999, Now does not give any error but result are not correct</SPAN>

Code:
=IF(ISERROR(LOOKUP(10^100,B$2:B$20)<=1),"",LOOKUP(10^100,B$2:B$20))

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
21
4
6
14
12
1
3
7
9
9
8
7
6
12
14
22
1
2
1
1
2
1
1
2
3
3
6

<TBODY>
</TBODY>
Data Result



Regards,
Moti
</SPAN>
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I refer the honourable gentleman to my tag line. I'm never going to be able to absorb all the nuances of VBA / Excel
 
Upvote 0
Thank you mole999, as per my opening post I am getting correct result with your formula posted in the post#8, only giving error when column is empty

</SPAN></SPAN>I will go with that </SPAN></SPAN>

I appreciate you kind help</SPAN></SPAN>

Regards,
Moti</SPAN></SPAN>
 
Upvote 0
did you try aladins

=IF(COUNTIF(B2:B20,">1"),LOOKUP(9.99999999999999E+307,
1/(ISNUMBER(B2:B20)*(B2:B20>1)),B2:B20),"")

?
 
Upvote 0
did you try aladins

=IF(COUNTIF(B2:B20,">1"),LOOKUP(9.99999999999999E+307,
1/(ISNUMBER(B2:B20)*(B2:B20>1)),B2:B20),"")

?

Yes mole999, but it also not resulting as I want please see the results below</SPAN></SPAN>


Book1
ABCDEFGHIJKLMNO
26461412137998761214
27223262336
Data Result


Regards,
Moti</SPAN></SPAN>
 
Upvote 0
Ah I see, you only want the LAST value of the row and not the MAX of the lines above, hence why mine sort of works. I would suggest conditional formatting to hide my errrors, but I'm sure there is code that does that
 
Upvote 0
Yes mole999, but it also not resulting as I want please see the results below

ABCDEFGHIJKLMNO
26461412137998761214
27223262336

<tbody>
</tbody>
Data Result



Regards,
Moti

B27 becomes 2 because the value of B6 (that is, JR22) is 2. Why is that wrong?
 
Upvote 0
I think its because it should only be evaluating JR32 for all returns (thats my understanding)
 
Upvote 0
Maybe this:

Layout

Game1234567891011121314
JR181
JR191211
JR20312
JR2113
JR2221
JR2311
JR24112
JR25123
JR2634
JR27151
JR28612
JR293
JR3014
JR3111125
JR3212121236
JR33
JR34
JR35
JR36
461412137998761214
222336
*************************************************************

<tbody>
</tbody>


Formula

Code:
In B22

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

And copy to the right.


Markmzz
 
Upvote 0

Forum statistics

Threads
1,215,410
Messages
6,124,756
Members
449,187
Latest member
hermansoa

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