Need a book? Engineering books recommendations...
Return to index: [Subject] [Thread] [Date] [Author]
RE: Simple Excel Visual Basic question.
[Subject Prev][Subject Next][Thread Prev][Thread Next]- To: <seaint(--nospam--at)seaint.org>
- Subject: RE: Simple Excel Visual Basic question.
- From: "Stefan Reumers" <Reumers.S(--nospam--at)ellimetal.com>
- Date: Mon, 10 Apr 2006 08:44:56 +0200
Casey, This is a small example of a range
manipulation I use in one of my programms. The cells are defined numerically (1,1) instead
of using the address notation “A1” In the example below, for example Cell
(6,12) corresponds to Cell “L6” For i = 1 To Nwind H = Worksheets("Cylinder").Cells(i
+ 5, 12).Value / 1000 Select Case H Case Is < zmin vm = alfa1 * vref IV = beta1 Case Else vm = alfa2 * vref * (H / 10) ^
expo IV = beta2 * (H / 10) ^ (-expo) End Select QB = ro / 2 * vm ^ 2 * (1 + 6 * IV)
Worksheets("Cilinder").Cells(i + 5, 22).Value = QB Next i I hope this is helpful Stefan From: Casey K.
Hemmatyar [mailto:khemmatyar(--nospam--at)gmail.com] I've got a Excel Visual Basic question. I know how to write a simple program which can manipulate a
single cell and the following shows it: Sub test() a = ActiveSheet.Range("thickness") b = ActiveSheet.Range("length") e = a * b ActiveSheet.Range("force") = e * 10 End Sub However I'd like to manipulate a "range" rather
than a "cell". That means for instance I'd like to manipulate the
"range" that consists of A1, A2, A3 & A4 which can all in the
same column or row. The reason for this is that I'd like to iterate a series of
complex calculations. I appreciate your input. Casey Hemmatyar, PE (Khashayar) |
- Follow-Ups:
- RE: Simple Excel question.
- From: Gary Hodgson & Associates
- RE: Simple Excel question.
- Prev by Subject: Re: Simple Excel Visual Basic question.
- Next by Subject: RE: Simple Excel VISUAL Basic question.
- Previous by thread: Re: Simple Excel Visual Basic question.
- Next by thread: RE: Simple Excel question.
- About this archive
- Messages sorted by: [Subject][Thread][Author][Date]