Make a formula more efficient and lose volatility

High Plains Grifter

Board Regular
Joined
Mar 9, 2010
Messages
129
Hello people,

I created some time ago a spreadsheet that my team uses to keep a record of some work that we do. The basic format is that each task takes up a row of the spreadsheet, with an Id, Title etc and a cell containing any notes that people may add to the task. This notes field has text wrapping on it and people add new notes by entering the cell and typing Alt+Enter to insert a line break, then adding the date in dd/MM/yy format, their initials and a note.

In another column, I have a field called "Last Note" Which records the date of the last note to be entered on each task. This is used for sorting, filtering, calculations and so on. The problem is that as the spreadsheet is getting larger, I have noticed that it no longer performs as fast as it did and I think that the horrible formula may be a part of the problem. I am streamlining the workbook, but I cannot see a better way to get the last note than this behemoth of array based volatility:

=IF(Id="","",IFERROR(IFERROR(DATEVALUE(IF(ISNUMBER(1*MID(SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))),FIND("¬",SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))))+1,1)),MID(SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))),FIND("¬",SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))))+1,MIN(FIND(" ",MID(SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))),FIND("¬",SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))))+1,1000))-1,FIND(":",MID(SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))),FIND("¬",SUBSTITUTE(Notes,CHAR(10),"¬",SUM(IF(MID(Notes,ROW(INDIRECT("A1:A"&LEN(Notes))),1)=CHAR(10),1,0))))+1,1000))-1)),"")),DATEVALUE(LEFT(Notes,8))),Id))

Entered with Ctrl+Shift+Enter
I have replaced the Id and Notes fields with single cell named ranges to make the formula clearer (probably a lost cause, that!). An example value for the notes field might be this:

Code:
01/01/13 : MJG : This is the first note I have added to this task, it is a lovely note and makes me glow with pride.
02/01/13 : JRM : That last note was awful and the pride felt had nothing to do with reality and everything to do with medication.

And the result of the formula would then be 42176, which is formatted to return the date "02/01/2013".

Any suggestions about how to get rid of the INDIRECT() volatility and simplify the whole thing?

Thanks for your time!
Mark
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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