View Single Post
  #1   Report Post  
Spint Spint is offline
Junior Member
 
Posts: 3
Default writing a value to a particular cell from function

Hi,

I just started writting vba, request for help in solving some problem.

| C | D | E | F | G
---|----- |------|----|-----|--------------------------
4 | 1 | 2 | 3 | X | =calc_G(c4,D4,E4,F4)
---|-----|------|-----|---- |--------------------------
5 | 4 | 5 | 6 | Y | =calc_G(c5,D5,E5,F5)
---|---- |---- -|-----|---- -|--------------------------
6 | | | | Z |
| | | | |


I would like to write a function which returns some value to G5.
inside the function i also like to calculate a value that should be stored in F5.

that means the value of Y needs to be calcuated from the previous values of C,D,E and F rows
i have nearly 10 to 15 cases where i need to use these cases.

my question is this.

is there any way i can return a value from the function and also inside the function
some calculated value to be set to particular cell.


function test( args)
Dim var

cellXX = var -10
funtion = var

endfunction