Dear guyz/galz
Is there any method / function (in any language) to convert a generic language expression to an excel formula ?
By generic language expression i mean something like this:
IF (Department="A" OR Department="B" OR Department ="C") then
Grade="1"
end if
(I consider only expressions which can be converted to a single line formula)
The converted excel formula should be like this:
=IF(OR(AB1="A";AB1="B";AB1 ="C");"1";"0")
AB1 is the cell containing department, no need to worry about tat i can map tat using info in an XML.
Thank u all
Arun
As far as I know, there is no native function or language construct to any programming language to do what you are asking. However, with basic regular expressions and string parsing functions (which almost all programming languages support) you can create your own function. You are essentially creating your own "language" and a compiler for it. Your application, is fairly trivial.
So basically, you want to convert:
intoCode:IF (Department="A" OR Department="B" OR Department ="C") then Grade="1" end if
using some language like C++? If you do, I'm not sure if there is anything prewritten, but with logic this simple, it wouldn't be hard to write your own converter.Code:=IF(OR(AB1="A";AB1="B";AB1 ="C");"1";"0")
Thankz to u all for trying to help me.
Yes tats wat i exactly want. Now wat i am doing is this:
I am constructing a binary tree from the first code
Then parse tat tree to make the second code.
Any helpful tips for these, or any suggestions?
Thankz again
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks