+ Reply to Thread
Results 1 to 19 of 19

Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Is it possible to make it so an array has a list of cells to include vs. a range of cells (i.e. A2:A10).


    So instead of writing A2:A5,B2:B5 you would have B2:B5 be something like ('Sheet 1'!B2,'Sheet 2'!B2,'Sheet 3'!B2,'Sheet 4'!B2,'Sheet 5'!B2)?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    What do you want to do with the array?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Similar to before. I want it to conditionally average data from different samples (1 per sheet) depending on if a "Yes" in selected in a drop down list.

  4. #4
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    I tried AVERAGE(IF(A2:A6="Yes",('Sheet 1'!B2,'Sheet 2'!B2,'Sheet 3'!B2,'Sheet 4'!B2,'Sheet 5'!B2)) and enter it as an array but no luck. Thanks for helping.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Is that not overcomplicating it a bit?

    See sheet. BtW.. also shows that STDEV.S is the modern equivalent of STDEV
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    At least when you use STDEV.S, there is no doubt that it is the SD of a sample of the population you are looking at... If for no other reason than that - STDEV.S is preferable to STDEV.

  7. #7
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Yeah I agree

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Incidentally, just in case you had a "thing" whereby you didn't want to bring the actual values across into your master sheet, did have a go and while I could get the average to work, trying to get the STDEV.S to work was nigh-on impossible.

    Anyway... you're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  9. #9
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    I would but the original question remains unanswered. I was hoping to avoid having to post all my data twice and organize it the way it needs to be. Plus I needed it for standard deviation too

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Now I am a little confused. Can you post a sheet showing your desired layout for the raw data and the desired output. I can't guarantee that I can make it work... but I feel as though I am fumbling around a bit...

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    I think I may have found a way. It's a bit foootery... so (if you don't mind... and even if you DO mind ) I'll wait until you supply the desired input/output as requested above.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    I may have to leave in about 10 minutes (not sure...) so, rather than wait, I have had a go...

    see sheet. Include/exclude sheets from DD in column B and your answers appear as if by magic. I hope...
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Very nice. It seems to work great, but I am reluctant to use it until I understand how it works. I am kind of in a rush right now so I don't have time to sit down and figure it out. How does the formula know to refer to each sheet (ie what does "Sheets" do?) I thought INDIRECT was to use a formula to determine a cell to reference.

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Sheets is a named range (CTRL-F3 to view) and refer to a list of the sheets to be examined. They are in A3 to A7. Ultimately it returns an array of the values in B2 of each sheet and multiplies it by whether or not the sheet has been selected for inclusion or not. In some of these array formulae, the evaluate formula tool is less than ideal, but... Formulas/Formula auditing/Evaluate formula will give you a good basic overview...

    Anyhow, you're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  15. #15
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Ahh, thank you! You certainly are a guru
    Last edited by finalmike; 08-21-2018 at 06:54 PM.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    You sent me a PM, asking how to make the formula "draggable". Try this... basically take the 2 outside the " and replace it with a counter that starts at 2 and increments by 1 per row.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Thanks, this also works great. I appreciate all your help. Could you possibly explain how this works? I understand everything but the use/need for the N function. It's working on the Sheets array you made, but I don't really understand what it's doing. If I drag the N() portion of the formula you made down in the worksheet you attached, it makes a list of the values of Sheet1's B2 value,Sheet2's B3 value, Sheet 3's B4 value and so on.

    In case someone asks me how it works, I'd like to be able to explain it myself, haha.
    Last edited by finalmike; 08-24-2018 at 07:25 AM.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    This: &ROWS($B$1:B2) is the counter. This resolves to 2 and in the next cell down, to 3, etc.

    N has no role in the "draggability". In essence it keeps it all in an array. Without it, the formula evaluates only the first sheet.

  19. #19
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Use of Individual Cells from Different Sheets in an Array instead of Range of Cells?

    Ok cool. That works for me. Thanks

+ 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. [SOLVED] Concatenate a range not just individual cells
    By soccer4ard in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2016, 03:02 PM
  2. create range from individual cells
    By maxwell888 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2016, 07:21 AM
  3. Storing individual digits to Array Cells
    By cdesantis01 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-13-2014, 09:23 PM
  4. [SOLVED] Appling a range of data to a range of individual cells
    By dubliquid in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-08-2013, 07:36 AM
  5. Selecting all individual cells from within a range.
    By milkru1234 in forum Excel General
    Replies: 1
    Last Post: 11-13-2012, 03:03 AM
  6. How to store strings in a array and paste them in individual cells in MS ACCESS..
    By shobinp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2012, 03:36 AM
  7. Retrieve individual cells from a range changed between a range
    By baldomero in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2005, 02:31 PM

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