Share via

Sorting Numbers in Excel ("LARGE" Formula Error)

Anonymous
2016-01-18T12:04:31+00:00

I have a spreadsheet that has a list of invoice numbers based on a date, I am then trying to use the LARGE formula to sort these invoice numbers into numerical order in another column. My Large formula return the error "no valid input data" Is this because the invoice number is being formulated based on a date? is there a work around for this?

    C                               D

1  Invoice Number        Date

2  1601260                    01/26/2016

3  1601261                    01/26/2016

4  1601250                    01/25/2016

The first 2 digits are the year:  (YEAR(D2))-2000)

Second 2 digits are month:  IF(MONTH(D8)>9,MONTH(D8),"0"&MONTH(D8))

Third 2 digits are day:   IF(DAY(D8)>9,DAY(D8),"0"&DAY(D8))

Last digit is a count, so if this is first occurrence of date then =0 2nd occurrence =1, etc...

IF(COUNTIF($D$2:D2,D2)>1,COUNTIF($D$2:D2,D2)-1,0))

the entire formula is:

IF(D2="","",YEAR(D2)-2000&IF(MONTH(D2)>9,MONTH(D2),"0"&MONTH(D2))& IF(DAY(D2)>9,DAY(D2),"0"&DAY(D2))&

IF(COUNTIF($D$2:D2,D2)>1,COUNTIF($D$2:D2,D2)-1,0))

Im then using the LARGE Formula

LARGE(C2:C9,1)

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Rory Archibald 18,965 Reputation points Volunteer Moderator
2016-01-18T14:39:16+00:00

You could change your formula to:

=IF(D2="","",(YEAR(D2)-2000&IF(MONTH(D2)>9,MONTH(D2),"0"&MONTH(D2))& IF(DAY(D2)>9,DAY(D2),"0"&DAY(D2))&

IF(COUNTIF($D$2:D2,D2)>1,COUNTIF($D$2:D2,D2)-1,0))+0)

Was this answer helpful?

0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-01-18T14:55:42+00:00

    I still dont know why but this worked for some reason.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-01-18T13:30:02+00:00

    I get back #VALUE, an Array Value could not be found.

    I don't use Array formulas very often, so I'm not sure how they work.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-01-18T13:02:49+00:00

    Enter below formula as an array formula (CTRL+SHIFT+ENTER) & copy down:

    =LARGE(VALUE($C$2:$C$9),ROW(1:1))

    Regards,

    Amit Tandon

    If this response answers your question then please mark as Answer.

    Was this answer helpful?

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more