#Name? problem that has been stumping Everyone

C

CondtllyFrmttd

I have been posting this message for about 5 days now and no one has
been able to help.

I have a macro that fills down the formula

=IF(AT2 = 500,MROUND(AI2,500),IF(AT2 = 5,MROUND(AI2,5),IF(AT2 =
10,MROUND(AI2,10),IF(AT2 = 25,MROUND(AI2,25),IF(AT2 =
100,MROUND(AI2,100),IF(AT2 = 200,MROUND(AI2,200),IF(AT2 =
364,MROUND(AI2,364),ROUNDDOWN(AI2,0))))))))

Each time I fill down the range using the macro I get a #name? error.
As I have posted before there is no error in the function because when
I go into the status bar at the end of the formula and MANUALLY hit
enter the formula calculates correctly.

Now here are some of the things that I have tried:

1) Made sure I have the Analysis Took Pak
2) Tried the formula IS ERROR w/ MATCH
3) Used the SendKeys function in the Excel to hit F2 to get to the end
of the function and hit enter
4) Used doubleclick to hit the active cell then hit Enter
5) I have checked the volatility of the program it doesn't matter
6) app.calculate
7) app.calculatefull
8) app.calculate xlautomatic, xlmanual, xlsemiautomatic
9) Iteration
10) calculate before save
11) Use Labels to calculate


If anyone has ran into this problem let me know. I need to know other
ways to go about finding a solution to this problem.
 
H

Harlan Grove

CondtllyFrmttd wrote...
....
I have a macro that fills down the formula

=IF(AT2 = 500,MROUND(AI2,500),IF(AT2 = 5,MROUND(AI2,5),IF(AT2 =
10,MROUND(AI2,10),IF(AT2 = 25,MROUND(AI2,25),IF(AT2 =
100,MROUND(AI2,100),IF(AT2 = 200,MROUND(AI2,200),IF(AT2 =
364,MROUND(AI2,364),ROUNDDOWN(AI2,0))))))))

Each time I fill down the range using the macro I get a #name? error.
As I have posted before there is no error in the function because when
I go into the status bar at the end of the formula and MANUALLY hit
enter the formula calculates correctly.
....

I can't replicate your results. When I use a macro to enter this
formula into cells, the formula returns zero rather than #NAME?

You could replace this formula with a much shorter one using only
built-in functions.

=IF(OR(AT2={5;10;25;100;200;364;500}),AT2*ROUND(AI2/AT2,0),TRUNC(AI2))

Further, this could handle many more divisors because it doesn't need a
separate level of nested IF calls for each divisor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top