Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default variable in a formula

hi

I have the following formula in a cell
=IF(ROUND(F2,C6)=B1,"ok","reject")

I'd like to be able to replace the = with < < etc
To this effect I have a combobox on the sheet loaded with
the various comparsion operators.

Is there any way I can put a reference to the combobox in
the formula to achieve something like this

=IF(ROUND(F2,C6) comobobox1 B1,"ok","reject")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default variable in a formula

Hi
without VBA this is AFAIK not possible

--
Regards
Frank Kabel
Frankfurt, Germany

"libby" schrieb im Newsbeitrag
...
hi

I have the following formula in a cell
=IF(ROUND(F2,C6)=B1,"ok","reject")

I'd like to be able to replace the = with < < etc
To this effect I have a combobox on the sheet loaded with
the various comparsion operators.

Is there any way I can put a reference to the combobox in
the formula to achieve something like this

=IF(ROUND(F2,C6) comobobox1 B1,"ok","reject")


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default variable in a formula

There is no "execute" function (that I am aware of) in Excel, VB or VBA,
which is what you'd need to do this directly. By an "execute" function, I
mean one that interprets a string as a code statement. More likely, have
your combobox show the results of one or the other of the several separate
different calculations that you will have to hide somewhere.

"libby" wrote in message
...
hi

I have the following formula in a cell
=IF(ROUND(F2,C6)=B1,"ok","reject")

I'd like to be able to replace the = with < < etc
To this effect I have a combobox on the sheet loaded with
the various comparsion operators.

Is there any way I can put a reference to the combobox in
the formula to achieve something like this

=IF(ROUND(F2,C6) comobobox1 B1,"ok","reject")



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default variable in a formula

I was wrong about the Execute function. Excel VBA does have an Execute
function, at least in Excel 2002, but I still don't see one you cane use in
a formula. Perhaps write a custom function?

"Bob Kilmer" wrote in message
...
There is no "execute" function (that I am aware of) in Excel, VB or VBA,
which is what you'd need to do this directly. By an "execute" function, I
mean one that interprets a string as a code statement. More likely, have
your combobox show the results of one or the other of the several separate
different calculations that you will have to hide somewhere.

"libby" wrote in message
...
hi

I have the following formula in a cell
=IF(ROUND(F2,C6)=B1,"ok","reject")

I'd like to be able to replace the = with < < etc
To this effect I have a combobox on the sheet loaded with
the various comparsion operators.

Is there any way I can put a reference to the combobox in
the formula to achieve something like this

=IF(ROUND(F2,C6) comobobox1 B1,"ok","reject")





Reply
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
variable formula LP23294 Excel Worksheet Functions 4 October 27th 09 07:46 PM
Variable VBA Max Formula Gizmo Excel Discussion (Misc queries) 2 June 6th 08 06:12 AM
Using a variable in a formula [email protected] Excel Discussion (Misc queries) 1 December 29th 06 11:46 AM
Using a second variable within a formula... Ed Anton Excel Discussion (Misc queries) 2 February 18th 05 11:51 AM
Variable in a Formula Amy Ja Excel Programming 3 April 21st 04 01:22 AM


All times are GMT +1. The time now is 06:18 PM.

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

About Us

"It's about Microsoft Excel"