I recently put together a feasibility / tradeoff model for a particular optical sensor. It is partly a "business case" and partly an intellectual exercise. I am considering creating a simple model development tool in Excel. #Visual basic for excel cells function fullHowever, the problem is not quite as hard as having to do a full parse of all possible excel formulae - see my reply to Skip to see why. I realise it could take a bunch of coding to properly parse a formula, which is why I was asking in the original post if any of the clever chaps here knew of any way to access Excel's internal representation of the formula structure. Tony RE: Parsing Excel formula SkipVought (Programmer) 4 Jan 11 16:11 I had the vague thought that it might be possible to try to do it by using the evaluate method and somehow catching any errors generated, but I'm not sure where to start. In other words, the function should look for anything in the formula which is not an operator, or a cell address, or a worksheet function, or a UDF.Ĭan anybody think of an easy way of doing this? Then I want to be able to apply a function (in code) to that formula such that the output of the function is the array (fred, bill, henry) - whether fred, bill or henry are defined as range names or not. The tricky bit is that it has to work even if the named range has not yet been defined. All I am really looking for is a means to identify named variables (ranges) called in a formula. If the above can't be done by directly accessing Excel's internal parsed structure, can anyone suggest where I might be able to find some useful VBA to do the job?Īctually, I don't need a full formula parser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |