Article View: pl.comp.lang.vbasic
Article #104720Re: Zwracanie zakresu komorek przez funkcje
From: ZikO
Date: Sun, 21 Nov 2010 13:14
Date: Sun, 21 Nov 2010 13:14
44 lines
2011 bytes
2011 bytes
On 21/11/2010 12:18, ZikO wrote: > Witam > > Czy ktos moze mi poradzic jak zwrocic obszar komorek w Excelu z funkcji? > > Przykladowo na zasadzie porowan If ... Then ... buduje zakres komorek, > ktory nie jest ciagly i zapisuje go w zmiennej typu String, czyli np mam > cos takiego: > > sRange = "A1,A5,A6,A7,A10" > > itd. > > Czy jest mozliwosc zeby zwrocic taki obszar w taki sposob, zebym mogl > ten obszar uzyc w jakiejkowliek formule =SUM(sRange), =POWER(10, sRange) > > itd. > > Dzieki i pozdrawiam > > > > PS. Jestem totalnie poczatkujacy i ucze sie VBA wiec problem moze byc > trywialny Znalazlem odpowiedz jesli ktos bylby zainteresowany [Code] 'Function SumOfLog(ParamArray vArgList() As Variant) As Double ' Dim rCell As Range ' Dim vArg As Variant ' Dim dSumArray As Double ' ' For Each vArg In vArgList ' For Each rCell In vArg ' If WorksheetFunction.IsNumber(rCell) Then ' dSumArray = dSumArray + WorksheetFunction.Power(10, _ 'rCell / 10) ' End If ' Next rCell ' Next vArg ' SumOfLog = 10 * Log10(dSumArray) 'End Function [/Code]
Technical Details
Message-ID:
<icb604$2br$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mailReferences:
<icb2n1$ofi$1@news.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail From: ZikO <zebik@op.pl> Newsgroups: pl.comp.lang.vbasic Subject: Re: Zwracanie zakresu komorek przez funkcje Date: Sun, 21 Nov 2010 13:14:45 +0000 Organization: http://onet.pl Lines: 44 Message-ID: <icb604$2br$1@news.onet.pl> References: <icb2n1$ofi$1@news.onet.pl> NNTP-Posting-Host: cpc4-stkp8-2-0-cust98.10-2.cable.virginmedia.com Mime-Version: 1.0 X-Trace: news.onet.pl 1290345284 2427 86.8.51.99 (21 Nov 2010 13:14:44 GMT) X-Complaints-To: niusy@onet.pl NNTP-Posting-Date: Sun, 21 Nov 2010 13:14:44 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: <icb2n1$ofi$1@news.onet.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit