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: 22
Default #NAME? on correct formula

Hi,

I want to enter a formula into a cell using VBA but while the formula is
sound it leaves "#NAME?" in the cell until you manually click into and out of
it. Is there anything I can do to stop this?

ActiveCell.FormulaR1C1 = "=ROUND(VLOOKUP(R[3]C,'Part
Time'!A:H,8,FALSE)*52/1.5,0)"

Also, how do I fix a reference in R1C1 format? The formula below has
apostraphes around the usual excel range but that needs to be fixed. any
ideas?

ActiveCell.FormulaR1C1 =
"=IF(R[-4]C=""Full-time"",""N/A"",R[-2]C-SUMIF(B8:B5000,""Monday"",R[3]C:R[8000]C)/7.5*VLOOKUP(R[1]C,'Part
Time'!A:H,3)-SUMIF(B8:B5000,""Tuesday"",R[3]C:R[8000]C)/7.5*VLOOKUP(R[1]C,'Part
Time'!A:H,4)-SUMIF(B8:B5000,""Wednesday"",R[3]C:R[8000]C)/7.5*VLOOKUP(R[1]C,'Part
Time'!A:H,5)-SUMIF(B8:B5000,""Thursday"",R[3]C:R[8000]C)/7.5*VLOOKUP(R[1]C,'Part
Time'!A:H,6)-SUMIF(B8:B5000,""Friday"",R[3]C:R[8000]C)/7.5*VLOOKUP(R[1]C,'Part Time'!A:H,7))"

Thanks in advance for any help you can offer.
JohnP
 
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
Correct formula for this Andrew Chalk Excel Worksheet Functions 8 December 13th 07 08:52 AM
What is the correct formula for IF C5 = Y, then L5 *.06? pegdog Excel Worksheet Functions 4 October 10th 07 04:51 AM
Need the correct formula Rob K Excel Discussion (Misc queries) 4 May 10th 07 02:53 AM
How do I correct this formula? Rebecca Excel Worksheet Functions 2 March 24th 06 02:37 AM
What's the correct formula? zubee Excel Discussion (Misc queries) 4 September 5th 05 04:45 PM


All times are GMT +1. The time now is 10:28 PM.

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"