LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Evaluate text formula in VBA

On May 22, 4:05 pm, Gvaram wrote:
Thank you Lavedas, but Bob's solution here is better because it will be
easyer to wright rules like
and([AAA]=[AAB],[BBA]<[BBB]) then
and(""" & AAA & """=""" & AAB & """, """ & BBA & """<""" & BBB & """)

Could you help me with some new problem?
instr([AAA],[AAB])=0 after parsing it becomes
instr("8o6t56-a","8o6t56-b")=0 because AAA and AAB are strings.
Problem is that
Evaluate("instr("8o6t56-a","8o6t56-b")=0") returnes compile error

Is there any solution?

The problem is that your definitions of or the substitution operation
needs to provide more double quotes. The string being evaluated needs
to look like this ...

"instr(""8o6t56-a"",""8o6t56-b"")=0"

for the Evaluate to work. I would suggest that the fix be made in the
variable definition ...

AAA = """8o6t56-a"""
AAB = """8o6t56-b"""

All in all what you are trying to accomplish is very confusing to me.
I really haven't a clue how you plan to implement this - all those
definitions and all the substitutions - how will you ever get them all
right? The code just doesn't seem to be the least bit scalable to me,
but then, as I said, I'm confused.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Evaluate text strings as a formula Nick Flyger Excel Programming 5 October 4th 06 11:08 AM
Using OR to evaluate TEXT stacy[_2_] Excel Programming 2 August 26th 05 08:10 PM
converting constant/text to formula and evaluate it tsuoying Excel Programming 1 February 19th 05 04:28 PM
VBA Function to evaluate hlookup text string as formula Eric[_22_] Excel Programming 2 August 2nd 04 04:57 PM
How to evaluate a text expression as formula ? Krzysztof Klimczak Excel Programming 0 August 29th 03 04:31 PM


All times are GMT +1. The time now is 03:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"