EVAL function not working

RobbertH

Active Member
Joined
Apr 29, 2008
Messages
310
Hi all,

I have a problem with the the evaluation function which I can't figure out why.

I have the function which looks like:

=INDEX($A$19:$I$39,MATCH("Paid Admissions",$D$19:$D$39,0),COLUMN())

Now I have the same function as text which I am trying to evaluate with a user defined function "evaluation" (same as the morefunc add in) EVAL

INDEX($A$19:$I$39,MATCH("Paid Admissions",$D$19:$D$39,0),COLUMN())

The outcome of the EVAL treats the COLUMN() part as 1 instead of the column in which the eval function is placed.

When I evaluate just COLUMN() it works perfectly.....

Where do I go wrong??

Hope I am being clear enough...
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

RobbertH

Active Member
Joined
Apr 29, 2008
Messages
310
FastExcel,

Thanks for your repley. Unfortunately for suggested function doesnt work for me. Like with my own public function it the eval treats the column() part as being 1. Therefore the index return the value from the right row (the match function works) but from column A instead of the column where the eval function is situated.

Crazy thing is that when I only evaluate column() it does return the column number of the column where the eval function is situated.

I did manage to tackle the problem, although not a very pretty solution.

i took the the ,column()) part out of the text that the eval function evaluates.
then I inserted the eval function like this:
=eval($A$44&","&COLUMN()&")")

I really have no idea why it doesnt work like it is supposed to. Funny thing is that when i add the same index
in text: INDEX($A$19:$I$39,MATCH("Paid Admissions",$D$19:$D$39,0),COLUMN())+INDEX($A$19:$I$39,MATCH("Paid Admissions",$D$19:$D$39,0),COLUMN())

is does work...

Bug in Excel??
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,122,910
Messages
5,598,803
Members
414,260
Latest member
joishe

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top