LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default VBA: Calculating Complex Numbers

First of all I'd like to say I appreciate this site and all who
participate. You are very helpful, very skilled, and very unique
individuals.

I need to call on you once again with a trigonometry problem. I need
code to sum the sine and cosine (in degrees) of a product of a variable
range.

IE

In Easy Language code it looks like this:

(Compute Dominant Cycle Phase)


DCPeriod= IntPortion(Value1)
RealPart=0;
ImagPart=0;

For Count= 0 to DCPeriod-1 begin

RealPart= RealPart + Sine(360*count/DCPeriod)*(Cycle[Count]);
ImagPart= ImagPart+ Cosine(360*count/DCPeriod)*(Cycle[Count]);

End;

The Cycle data is located in Col (I) and begins in row 7
The Value1 data is in Col (P) and begins in row 12.


I would like to be able to have the results for RealPart and Imagpart
in the next Col (Q &R) respectively. Below is sample data:


(I) (P) (Q) (R)
Cycle Value1 RealPart ImagPart



0.0
..02
-.05
-.124
-.191
-.231 .3 Result Result
-.251 1.1 Result Result
..064 4.5
..014 10.8
..028 10.3
-.049 12.5
-.07 13.4
-.135 11.3
-.203 12.3
-.283 13.2
..036 14.6
..053 27.2
..085 28.4 Etc Etc



Perhaps this can be calculated as a function?

If you need any more info, I'll be glad to clarify.

Thank You again,
Len S

 
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
Calculating growth with negative numbers Tsipi4me Excel Worksheet Functions 3 April 3rd 23 12:12 PM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 3 January 19th 06 09:52 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 1 January 9th 06 01:23 PM
Calculating numbers of hours worked in pay divisions andyiain Excel Discussion (Misc queries) 1 December 22nd 05 11:28 AM
Checking Winning Numbers in the Lottery. Ann Excel Discussion (Misc queries) 4 May 18th 05 10:55 AM


All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"