Yeah, that's only for that exact string. If the only thing you know is that the number will be at the end and immediately preceded by "Pages printed: ", how about this:

Code:
=VALUE(RIGHT(A1,13-FIND(": ",RIGHT(A1,14))))


This assumes that the number is at the end of the text, immediately preceded by ": " (colon space), that it will be the only occurrence of ": " in the last 14 characters of the text (which is safe, assuming it's always preceded by "Pages Printed"), and that the number is less than 13 digits long.

This should really be a lot easier. It ought to be:

Code:
=VALUE(REGEX("\d+?$", A1))


But Excel's functions are limited.


Edited by wfaulk (27/07/2007 16:36)