I've been trying to make a purchase order number generate automatically using excel. I got it down so far and have hit a brick wall. The formula I'm using at the minute is
=IF(OR($E5="",ISNA(IF(COUNTIF($E$2:$E5,$E5)=1,MAX(IF($C$2:$C4<40000,$C$2:$C4))+1,INDEX($C$2:$C4,MATCH($E5,$E$2:$E4,0))))),"",IF(B5="",""))))
Bacially, on my table (that I will Hyperlink to) I want to go by the date the order would be placed so the Number isn't then restricted to being in chronological order. I tried this and then it came up with circular references for fun.
I hope I've explained this properly using my table.
http://www.filedropper.com/exampleforordernumber
=IF(OR($E5="",ISNA(IF(COUNTIF($E$2:$E5,$E5)=1,MAX(IF($C$2:$C4<40000,$C$2:$C4))+1,INDEX($C$2:$C4,MATCH($E5,$E$2:$E4,0))))),"",IF(B5="",""))))
Bacially, on my table (that I will Hyperlink to) I want to go by the date the order would be placed so the Number isn't then restricted to being in chronological order. I tried this and then it came up with circular references for fun.
I hope I've explained this properly using my table.
http://www.filedropper.com/exampleforordernumber