+ Reply to Thread
Results 1 to 3 of 3

What does .Range(.Cells(1, 16), .Cells(LR, LC)) mean?

  1. #1
    Registered User
    Join Date
    03-08-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    27

    What does .Range(.Cells(1, 16), .Cells(LR, LC)) mean?

    Hi,

    I have the following code
    Please Login or Register  to view this content.
    The macro will automatically perform the following actions in “Sheet2” tab:-
    i. Sort the full data set by column R in alphabetical order.
    ii. Autofill the formulas from column A to column P.
    iii. Total up columns N (Taxable), O (Non Taxable), P (Tax and NIC) and Q (Charged Amount (Home Cur)).
    iv. Include 2 control checks:-
    - Check 1: Total column N (Taxable) + Total column O (Non Taxable) = Total column Q [Charged Amount (Home Cur)]
    - Check 2: Total column Q (Charged Amount (Home Cur)) = Total as per E-Expense Report
    If the values in “Check 1” and “Check 2” rows (amounts in column Q) do not equal to zero, the font will turn red to remind the preparer the amounts do not tie.


    Could anyone please explain to me what does ".Range(.Cells(1, 16)" in row 8 of the above code mean?

    I try to change the "16" to other number but it seems like it does not have any effect.

    Thanks.
    Attached Files Attached Files
    Last edited by fang603; 08-12-2012 at 01:18 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: What does .Range(.Cells(1, 16), .Cells(LR, LC)) mean?

    .Range(.Cells(1, 16) is the same of .range("P1")
    P is column 16

  3. #3
    Registered User
    Join Date
    03-08-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: What does .Range(.Cells(1, 16), .Cells(LR, LC)) mean?

    Hi Patel45,

    Great. Thanks for explaining to me.

+ 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