MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Create Dynamic Ranges in VB

  Asked By: Daisy    Date: Dec 20    Category: MS Office    Views: 1622

i want to make dynamic ranges in VB.
I have a database wherein i keep adding data in rows. I want someone
to create a dynamic range which will expand as and when other cells
are filled. Example, I have data in columns A, B & C. In a2 & b2
there are amounts which are filled manually and C2 is a function, =sum
(a2*b2) as and when i fill a3 & b3 the formula in should get exteded
in C3 dynamically. Please Help me to do this with VB with offset



2 Answers Found

Answer #1    Answered By: Dylan Evans     Answered On: Dec 20

Tools|Options then Edit tab, check the checkbox 'Extend list formats
and formulas'

Answer #2    Answered By: Kerry Wright     Answered On: Dec 20

It is not necessary to write code to do what you want. In Row 1 for
each of your columns, create  a title. Select A1:C2
From the data  menu, select Forms. The form dialog will show you the
names of your "fields", you can perform your data entry and as you move
to the next new record, the Form will automatically copy the formula
located in column C down to the next record. You will not be able to
see the result of the formula  until you leave the record, but the form
will show you the result as well. I believe the limit on the number of
fields you can use with Forms is 52.

Didn't find what you were looking for? Find more on Create Dynamic Ranges in VB Or get search suggestion and latest updates.