Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Syntax for Accepting Worksheet Formulas in VB

Hello,

I was looking for a way to have a custom user setup of formulas read by a
standard VB code so the code can adjust to assigning values per formula
entered.

The process involves three worksheets:

Setup
Data
Results

For every column in Results I will have a corresponding formula in Setup.
In Setup, I will have a row to enter in the formulas that all reference the
Data worksheet cells.

In VBA, I will use a For Next loop for reading in formulas, and then nest
that into another For Next loop that runs the count of rows.

If I understand VB syntax correctly my psuedo code would look like this
(assuming that I already have the means to assign the count of rows further
up the code):

For row of Rows as i
For formula of Formulas as j
Data(i,j).formula=Setup(r,j).formula
Results(i,j).value=Evaluate(Data(i,j))
Next
Next

I will have a clear worksheet command at the top for the Results worksheet
and assign the code to a macro button. Upon clicking the macro button the
code will clear the worksheet of old data, read the number of rows of the new
Data as Rows, , do the same for columns for the number of fomrulas, and BAM
run the For Next loops to lay down converted data.

Does this sound like a good plan? This is my first real VB code from
scratch (I have been tweaking provided Macros for years and its time I grow
up!)

Thanks.
Reply
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
Worksheet reference syntax? Matt Excel Discussion (Misc queries) 3 May 19th 08 09:02 PM
VBA Syntax for using a variable in a worksheet function xjetjockey Excel Discussion (Misc queries) 3 January 9th 07 04:23 AM
all function formulas syntax azeem mansoori Excel Discussion (Misc queries) 1 May 28th 05 11:56 AM
Syntax to check protected status of a worksheet? [email protected] Excel Discussion (Misc queries) 2 January 18th 05 02:53 PM
Easy Syntax question: referring to worksheet by VBA name KR Excel Programming 2 November 22nd 04 07:53 PM


All times are GMT +1. The time now is 01:00 PM.

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"