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: 13
Default Who can tell me where I go wrong?

Who can tell me what is wrong with the following code?

NieuwArtikelNr is a worksheet name that functions ok in other code

FormuleC and FormuleE lock up
Formule G and Formule H give #NAME? but when I select the field and
give an enter (above in the formuladisplayingthingie) it works like a
charm.

I suspect it has to do with the way I enter the formula's into the
cell??
(ActiveCell.Formula = FormuleC)

Anybody has suggestions???????

Dim FormuleB As String
Dim FormuleC As String
Dim FormuleD As String
Dim FormuleE As String
Dim FormuleF As String
Dim FormuleG As String
Dim FormuleH As String
Dim FormuleI As String
Dim FormuleJ As String

FormuleB = "=" & NieuwArtikelNr & "!$A$3"
FormuleC = "=ALS(AANTALARG('" & NieuwArtikelNr &
"'!$A$9:$A$50)<=AANTALARG(" & NieuwArtikelNr & "!$D$9:$D$50);" & "Ja;"
& "Nee)"
FormuleD = "=" & NieuwArtikelNr & "!$D$10"
FormuleE = "=ALS(AANTALARG('" & NieuwArtikelNr &
"'!$A$9:$A$50)<=AANTALARG('" & NieuwArtikelNr &
"'!$D$9:$D$50);'Ja';'Nee')"
FormuleF = "NietGevuldInOrigineel"
FormuleG = "=AANTALARG(" & NieuwArtikelNr & "!$C$9:$C$50=CHM)"
FormuleH = "=AANTALARG(" & NieuwArtikelNr & "!$A$9:$A$50)"
FormuleI = "=" & NieuwArtikelNr & "!$D$3"
FormuleJ = FormuleI & "+ 365"

'ArtikelOmschrijving in B
Sheets("hoofdblad").Select
Range("B2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleB

'Beschikbaar in C
Sheets("hoofdblad").Select
Range("C2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleC

'Beschikbaar in D
Sheets("hoofdblad").Select
Range("D2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleD

'Beschikbaar in E
Sheets("hoofdblad").Select
Range("E2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleE

'Beschikbaar in F
Sheets("hoofdblad").Select
Range("F2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleF

'Beschikbaar in G
Sheets("hoofdblad").Select
Range("G2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleG

'Beschikbaar in H
Sheets("hoofdblad").Select
Range("H2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleH

'Beschikbaar in I
Sheets("hoofdblad").Select
Range("I2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleI

'Beschikbaar in J
Sheets("hoofdblad").Select
Range("J2").End(xlDown).Offset(1, 0).Select
ActiveCell.Formula = FormuleJ

 
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
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
i did something wrong Roy Excel Discussion (Misc queries) 3 October 9th 06 10:45 PM
What is wrong with this bach Excel Discussion (Misc queries) 0 September 6th 05 09:09 AM
What is wrong? Andy Dorph Excel Programming 1 April 12th 05 04:52 PM
Where am I going wrong with this? [email protected] Excel Programming 1 May 25th 04 05:04 PM


All times are GMT +1. The time now is 08:50 AM.

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"