+ Reply to Thread
Results 1 to 4 of 4

VBA multiple worksheets

  1. #1
    Registered User
    Join Date
    03-20-2012
    Location
    NC
    MS-Off Ver
    Excel 2007
    Posts
    24

    VBA multiple worksheets

    I have three worksheets: X, Y, Z. Each has the same number of rows and columns. As each cell in Y and Z is created their average is put into X.

    The code looks like:

    Please Login or Register  to view this content.
    even though the data in Z is there, it comes through as null. The values in Y are fine.
    Last edited by alansidman; 11-14-2020 at 06:44 PM.

  2. #2
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: VBA multiple worksheets

    jalea148,

    Unless you have a reason not too, wouldn't it be a lot easier to put a formula in X?

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,937

    Re: VBA multiple worksheets

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,540

    Re: VBA multiple worksheets

    Does it make a difference if you multiply by 1?
    Are your Sheet Names valid? No leading or trailing spaces which would not use the value in that sheet.
    Tried following on a quick trial wb and that works as advertised.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 06-07-2019, 07:44 AM
  2. [SOLVED] Macro to pull columns of data from multiple worksheets into summary worksheets
    By crandell84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2018, 05:44 PM
  3. Replies: 1
    Last Post: 07-26-2013, 11:20 PM
  4. Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 08:21 PM
  5. [SOLVED] Copying Worksheets from Multiple Workbooks to a Single Workbook, Separate Worksheets
    By DHartwig35805 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-27-2012, 11:38 AM
  6. Copying Worksheets from Multiple Workbooks to a Single Workbook, Separate Worksheets
    By Abhi_1977 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2012, 11:32 AM
  7. Creating and naming multiple worksheets; copying contents to new worksheets
    By HeadfortheHills in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2012, 08:49 AM

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