Need code or formula ( next large value replace with word " last")

furqan_q

New Member
Joined
Dec 21, 2017
Messages
19
Hi, i need help in formula or VBA code any thing, i am using =COUNTIF($A$2:$A2,A2) formula, it is giving me count of my duplicate lease no which are in column A, i need to replace highest number with word "Last".
eg:
LEASE NO IS IN "A" COLOUMN = 10005 ( total lease for 10005 duplicates are 5 )
TOTAL LEASE VERSION = 5 (=COUNTIF($A$2:$A$13,A2)
LAST AND HIGHEST LEASE VERSION = 5 (Need to Replace 5 with "LAST" ) =COUNTIF($A$2:$A2,A2)
see the attached file pic and excle .Thanks
 

Attachments

  • last snap.JPG
    last snap.JPG
    93.5 KB · Views: 12

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I assume that you have 365 or 2019 Excel.

Enter the following formula in C1 and copy it down.

=IF(MAXIFS($B$1:$B$9,$A$1:$A$9,A1)=COUNTIFS($A$1:A1,A1),"Last",COUNTIFS($A$1:A1,A1))
1624393498176.png


Kind regards

Saba
 
Upvote 0
Hi

Please enter the following array formula in C1 by pressing CONTORL + SHIFT + ENTER keys and copy it down.

=IF(MAX(IF($A$1:$A$9=A1,$B$1:$B$9,0))=COUNTIFS($A$1:A1,A1),"Last",COUNTIFS($A$1:A2,A2))

Name error occurred as 2010 does not have MAXIFS formula.

Please update your version of Excel so that we can provide solutions that will work in your Excel version.

Kind regards

Saba
 
Upvote 0
Thank you so much for ur help, it works now ... i almost spend 10 hours finding this formula and was not able to do so ... Thanks you once again for ur help and support .
 
Upvote 0
Try this regular formula:

Dante Amor
ABC
1cclast vl ver no
210001LAST
3100051
4100052
5100053
6100054
710005LAST
810089LAST
9102011
10100121
11100122
1210012LAST
13102012
14102013
15102014
16102015
1710201LAST
Hoja8
Cell Formulas
RangeFormula
C2:C17C2=IF(COUNTIF($A$2:$A$17,A2)=COUNTIF(A$2:A2,A2),"LAST",COUNTIF(A$2:A2,A2))
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,395
Members
449,081
Latest member
JAMES KECULAH

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