+ Reply to Thread
Results 1 to 2 of 2

explainations on a bit of code

  1. #1
    Registered User
    Join Date
    01-27-2007
    Posts
    49

    explainations on a bit of code

    Hey Guys,

    Can somebody help with some explainations on a bit of code.

    Please Login or Register  to view this content.
    - what does As long mean

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    - can some explain what this mean, i understand the basics of it but not the overall idea of it.

    Thanks in advance for any help.
    Gav.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: explainations on a bit of code

    q1
    declare a variable named DataEnd as a Long type variable
    Please Login or Register  to view this content.
    Variables hold information/data that used later within the macro

    q2
    places a sum furmula in a cell that sums column e from row 6 to 2 rows above the row where the formula is placed
    Please Login or Register  to view this content.

    e.g
    if activecell is e31 the following comand
    Please Login or Register  to view this content.
    places this formula =SUM($E$6:$E29) in e31

    q3

    the 2 lines of commands uses 2 different viarables
    TotalsRow & DataEnd

    finds the last used cell in column k
    puts the row number into a variable for later use
    Please Login or Register  to view this content.

    In the following command DataEnd should hold a row number
    e.g If DataEnd has row value 20
    Places lookup formula in f6 to f20


    Please Login or Register  to view this content.
    lookup formula. e.g
    if last used row in column K is row 50 then the lookup formula
    Please Login or Register  to view this content.
    is the same as saying
    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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