+ Reply to Thread
Results 1 to 3 of 3

Referencing the correct object in a formula

  1. #1
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Referencing the correct object in a formula

    I have macro that performs a reformat of a collection of sheets that are contained in a single workbook.

    Please Login or Register  to view this content.
    however the problem is with column F and this code


    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

    instead of applying to each individual sheet the FirstSht is referring to the very first sheet in the workbook instead of carrying out the operation in each worksheet of the formula. How would I change this so that the first sheet index is not being used in all the subsequent sheets but rather the columns that are specified in the formula?
    Last edited by capnhud; 06-21-2010 at 06:10 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Referencing the correct object in a formula

    Maybe like this (completely untested):
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Referencing the correct object in a formula

    That works perfectly: how do I put this part back in it?

    Please Login or Register  to view this content.
    Edit nvrmind:

    have to change to

    Please Login or Register  to view this content.

    Thank you so very much for you valuable assistance shg
    Last edited by capnhud; 06-21-2010 at 06:10 PM.

+ 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