LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
CNN CNN is offline
external usenet poster
 
Posts: 5
Default Creating macro for slightly complicated formula

I'm really new to the whole macro business so I really need help. I'm trying
to create a macro to solve this equation

D =(Sum from 1 to Nt ((X - Xmean)^2/Nt))^0.5 ......I hope it's clear. I
don't know hope to format here.

Anyway, I have a range of Xs that are Nt in number and Nt is unknown so it
will have to be found first and this has to be in the code. I'm trying to
avoid having another column containing the values of (X - Xt)^2/Nt. I just
want D to be displayed in a designated cell, like F2. This code will be used
for multiple workbooks, all the data always on sheet 1 and Nt always a
different value. All the ways I could think of involved having the extra
column.

I would really appreciate any help. All I have so far is

Sub Macro2()

Dim LR As Long
Dim Mean
Dim Total
Dim i As Long


LR = .Range("A" & .Rows.Count).End(xlUp).Row
Mean = Average("A2:LR")
Total = 0

For i = 2 To LR

and I don't even understand the principle behind the LR code.

Thank you and sorry if I was long winded.
 
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
A slightly complicated finance problem TopCat Excel Discussion (Misc queries) 1 July 13th 09 10:45 PM
Creating formula or macro Vecah Excel Worksheet Functions 0 November 5th 08 03:19 PM
Complicated formula or macro A.S. Excel Discussion (Misc queries) 3 September 6th 06 06:21 PM
Creating Complicated Charting smiles Charts and Charting in Excel 2 August 25th 06 08:29 PM
Creating a complicated formula Cheryl Excel Worksheet Functions 3 July 19th 06 12:50 PM


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