max date basis required next column.

Atul Kadam

New Member
Joined
Nov 22, 2016
Messages
6
dear All,

We have a huge data in excel file , we need to find max date in different columns and on the basis of max date we also required next column code.

Please suggest a formula or vba code.


Date
Code
Date
Code
Date
Code
Max Date
Code on the basis of max date
01-Nov-16
461
05-Nov-16
1124
30-Nov-16
1008
30-Nov-16
1008
30-Nov-16
1135
07-Dec-16
1091
24-Dec-16
1089
24-Dec-16
1089
06-Dec-16
1124
06-Dec-16
1126
10-Oct-16
979
06-Dec-16
Error
15-Nov-16
1049
01-Nov-16
1048
14-Dec-16
1060
14-Dec-16
1060
17-Oct-16
1061
15-Sep-16
1062
15-Sep-16
1085
17-Oct-16
1061
01-Sep-16
1173
08-May-16
1172
04-Jul-16
1170
01-Sep-16
1173
09-Aug-16
1171
08-Mar-16
1203
01-Nov-16
1207
01-Nov-16
1207

<tbody>
</tbody>
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try this:


Excel 2016 (Windows) 32 bit
ABCDEFGH
1DateCodeDateCodeDateCodeMax DateCode on the basis of max date
201-Nov-1646105-Nov-16112430-Nov-16100830-Nov-161008
330-Nov-16113507-Dec-16109124-Dec-16108924-Dec-161089
406-Dec-16112406-Dec-16112610-Oct-1697906-Dec-161126
515-Nov-16104901-Nov-16104814-Dec-16106014-Dec-161060
617-Oct-16106115-Sep-16106215-Sep-16108517-Oct-161061
701-Sep-16117308-May-16117204-Jul-16117001-Sep-161173
809-Aug-16117108-Mar-16120301-Nov-16120701-Nov-161207
Sheet1
Cell Formulas
RangeFormula
G2=MAX($A2:$F2)
H2=LOOKUP(2,1/($A2:$F2=G2),$B2:$G2)
 
Upvote 0
if date is same in two or three different cloumn then we have identify these cases and check with mannuly what is exact error
 
Upvote 0
In that case, try this:


Excel 2016 (Windows) 32 bit
ABCDEFGH
1DateCodeDateCodeDateCodeMax DateCode on the basis of max date
201-Nov-1646105-Nov-16112430-Nov-16100830-Nov-161008
330-Nov-16113507-Dec-16109124-Dec-16108924-Dec-161089
406-Dec-16112406-Dec-16112610-Oct-1697906-Dec-16Error
515-Nov-16104901-Nov-16104814-Dec-16106014-Dec-161060
617-Oct-16106115-Sep-16106215-Sep-16108517-Oct-161061
701-Sep-16117308-May-16117204-Jul-16117001-Sep-161173
809-Aug-16117108-Mar-16120301-Nov-16120701-Nov-161207
Sheet1
Cell Formulas
RangeFormula
G2=MAX($A2:$F2)
H2=IF(COUNTIF($A2:$F2,G2)>1,"Error",LOOKUP(2,1/($A2:$F2=G2),$B2:$G2))
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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