Page 1 of 1 1
Topic Options
#203173 - 2011-09-29 12:49 PM Excel Formula
WolfLep Offline
Just in Town

Registered: 2011-09-29
Posts: 2
Loc: Germany
Hello together,
i would like to write the following Formula in one Excel Cell.

$oXL.Cells($i,13).formula = 'WENN(ISTNV(SVERWEIS(I' + $i + ';' + CHR(39) + 'TELEFON-LISTE' + chr(39) + '!A2:B210;2;FALSCH));"";SVERWEIS(I' + $i + ';' + chr(39) + 'TELEFON-LISTE' + chr(39) + '!A2:B210;2;FALSCH))'
If i do so, it works.
But if i insert the "=" bevor 'wenn' nothing is be written

If i insert the "=" in excel, the Formula works perfect.

If i write the next statement to excel, it works perfect.
$oXL.Cells($i,13).formula = '=AC' + $i

Whats wrong?

Thanks for help

Wolfgang

Top
#203178 - 2011-09-29 04:05 PM Re: Excel Formula [Re: WolfLep]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hi Wolfgang,

I have played a bit with a simpler formula:

 Code:
	$xl.Cells(1,1).Value = 1
	$xl.Cells(2,1).Value = 1
	$xl.Cells(3,1).formula = '=SUM(A1:A2)'


works as expected (Displays the sum of A1 and A2 in A3), so I assume the '=' is correct in this place .. Not sure yet why it doesn't write anything with your formula

[edith says: haven't read your post that far, so as you already came to the same conclusion (= works in simpler formulas) my post is futile :/]


Edited by Jochen (2011-09-29 04:30 PM)
_________________________



Top
#203181 - 2011-09-29 07:05 PM Re: Excel Formula [Re: Jochen]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
do you have a sample worksheet that gets this formula to work?
Top
#203185 - 2011-09-30 09:00 AM Re: Excel Formula [Re: ShaneEP]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
no
_________________________



Top
#203205 - 2011-10-04 10:46 AM Re: Excel Formula [Re: Jochen]
WolfLep Offline
Just in Town

Registered: 2011-09-29
Posts: 2
Loc: Germany
Thanks for testing,
i tried this
write the formula on row 29 and made a copy while filling with data
$oXL.Cells($i,13).formula = $oXL.Cells($i,29).formula
I have a sheet with 260 line and overite them every time with
aktuell data. But only to row 20. With this copy the same formula
is now in the field 13 and it works. I don't know why.
May be there a problems with the ' and " in the statement. But without the
= it works.

Thank Wolfgang

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 456 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.058 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org