+ Reply to Thread
Results 1 to 5 of 5

Macro to auto place formulas

  1. #1
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Macro to auto place formulas

    I have a workbook that keeps track of extend day payments. I am trying to develop a report to keep from printing almost 300 individual sheets. The formulas are based on tab names. I have a macro to name the tab by typing the person’s name in A2 on the session pages. The Extended Day Report tab is where I am trying to get a formula or another macro to auto place in the appropriate cells. Please see the attached file.
    Attached Files Attached Files
    Last edited by Wskip49; 03-17-2011 at 08:30 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to auto place formulas

    In C2, then copied down:

    =IF(INDIRECT("'" & $B2 & "'!$H10")<>"","Yes","No")

    In D2, then copied down:

    =IF(INDIRECT("'" & $B2 & "'!$H11")<>"","Yes","No")

    ...etc.

    Once you've created your formulas C2:K2, just copy them down as far as needed for the names you've placed in column B.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Macro to auto place formulas

    Hi Wskip49

    Find the attached that will put all session tabs on the last tab in the workbook and give you what I think you want. Welcome to Pivot Tables.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: Macro to auto place formulas

    Thank you so much, you have saved me hours and hours of time. I think JBeaucaire works best for me. However, could you please help me understand the (INDIRECT("'" & $B2 & "'!$H11")<>""

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to auto place formulas

    Click on the cell and use the Evaluate Formula icon on the Formula Auditing toolbar. It will let you "step" through the formula one calc at a time and you can see how it works.

    Press F1 in Excel and read up on INDIRECT() and how it lets you piece together text strings to create a cell/range reference, then use that reference in a formula.

    ======
    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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