LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Trying to evaluate cell referenes in a string

I have a formula that takes a few parameters. For one of the string
parameters I want to concatenate values from cells in the spreadsheet
directly in the formula.

For example cell A1 = Bob cell B1 = Smith

In another cell I call my formula =My_formula("Name", A1 & " " & B1).
When I press enter on this, my formula is called and is passed two strings:
param1 = Name and param2 = Bob Jones

This is what I would expect, through Excel, but here is my problem:

I have a button, that when pressed, finds cells that contain My_formula and
gets the pertinent data out of them without executing each individually. It
gathers all of the data to make a batch call to a data store. I am parsing
the string
My_formula("Name", A1 & " " & B1). I can parse it and get the two parameters:
param1 = Name and param2 = A1 & " " B1
Excel did not process this, it is being read as a string, therefore the cell
references are not evaluated. Without parsing this even more, is there a way
to get Excel VBA to take something like A1 & " " B1 and evaluate the cell
references so that it returns Bob Smith ?
 
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
Is there a function that will evaluate a text string in a cell? Dave Excel Worksheet Functions 2 October 7th 09 04:25 AM
UDF evaluate string output David Excel Programming 9 September 9th 08 08:02 AM
Evaluate a Variable Name from a String Developer of the Caribbean Excel Programming 4 November 11th 05 07:50 AM
How to evaluate string? Boban Excel Programming 4 November 4th 05 06:21 PM
Evaluate string as a formula peacelittleone Excel Worksheet Functions 3 June 26th 05 06:20 PM


All times are GMT +1. The time now is 01:09 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"