LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Write formula with code ...

Hi There,

Starting Cell = A20 (GBSUP)
Number of items = Variable but Starting at $B$21 ...B65000
Number of Periods = Variable C19 ...20 ...21 ....


DEC1403 DEC1204 DEC1105 .....
GBSUP
WHITE B.I.B1 1,9 1,8 2,1
WHITE B.I.B2 4,6 4 4,6
WHITE B.I.B3 4,1 4,4 5,3
WHITE B.I.B4 0 0 0
WHITE B.I.B5 0 0 0
.....

I would like to write via code a formula that multiplies my %shares
(the figures above) with my totals which I calculate as follows:
=INDEX(SOURCE;MATCH($A$20;INDEX(SOURCE;;1);0);MATC H(C$19;INDEX(SOURCE;1;0);0))

In this example I would copy down and 3 cells to the right in F21:
=OFFSET($A$20;ROW()-20;COLUMN()-COUNTA($19:$19)-1;1;1)*INDEX(SOURCE;MATCH($A$20;INDEX(SOURCE;;1);0 );MATCH(C$19;INDEX(SOURCE;1;0);0))

The problem is that my starting point to plug this formula in varies:
It depends on the number of periods chosen (in row 19)
(and the number of items down).

Hope you understand,
Could you help me out please?

Best Regards Sige

 
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
could someone write me a VB code? thanks Morgan New Users to Excel 6 March 10th 10 01:20 PM
Write code to Write Code Kstalker[_43_] Excel Programming 6 November 25th 05 12:30 AM
Code to write out all lines of code davidm Excel Programming 3 August 5th 05 04:26 AM
How do I write a formula to color code based on dates provided or. jaime Excel Worksheet Functions 2 February 17th 05 12:41 AM
How can i write TSR code A-Design Excel Programming 5 September 29th 04 05:26 PM


All times are GMT +1. The time now is 05:03 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"