Results 1 to 1 of 1

Moving through columns and displaying a different result in each through VBA

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Moving through columns and displaying a different result in each through VBA

    Hi everyone!

    I am new to this forum. I am a beginner at VBA, trying to develop my skills.

    I was wondering if anyone would be able to help me with this..



    I'm working with an area (7,2) on an excel sheet trying to test a procedure using a loop. So, this code works, but it does not apply the procedure for each COLUMN as I wanted, but instead, it calculates the skewness for the second column only. How could I get the skewness for each column and then return it to two distinct cells on a different excel sheet ?

    Sub test4()
            Dim function1 As Single
            Dim Ligne_tableau As Integer
    
    
            Ligne_tableau = 0
    
            Dim Arr As Range
            Set Arr = Range("A1:B7")
     
            Dim C As Range
        
     
            For Each C In Arr.Columns
                 function1 = WorksheetFunction.Skew(C)
                 Ligne_tableau = Ligne_tableau + 1
    
            Next C
        
           Set Destination = Worksheets("Sheet4").Range("A9")
           Destination.Resize(1, 2).Value = Application.Transpose(function1)
        
        End Sub
    Thanks in advance for all your help!
    Last edited by arlu1201; 04-07-2013 at 02:23 PM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1