+ Reply to Thread
Results 1 to 9 of 9

Removing column from calculation

  1. #1
    Registered User
    Join Date
    05-26-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Removing column from calculation

    Hello, I've searched for something similar but could not find anything related.
    I have a file that has measurement data on the "data" tab. There could be up to 100 measurements for each point.
    There is also a "calculation" tab which performs the required calculation but only does so on the last 30 samples. This tab is protected for viewing only.

    What I'd like to be able to do is pick one or more columns in the "data" tab and have it disappear from the "calculation" tab and the remaining columns backfill to keep 30 samples. If you then uncheck the column it will reappear in the "calculation" tab.

    I've been doing this by actually deleting the column and then hitting "undo" to bring it back but I would like to keep all the data present on the "data" tab.

    I have included a file that has similar data to what I'm working with. There is no program on this file though.

    Any ideas on how to do something like this?

    Rick
    Attached Files Attached Files

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

    Re: Removing column from calculation

    Hi rwqiii,

    I think you really want to Freze Panes on your Calculation Tab. Simply put your cursor in D5 and find and click "Freeze Panes". This will allow you to scroll around your data and have the headings still visible.

    http://spreadsheets.about.com/od/exc...reeze_pane.htm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Removing column from calculation

    Hi rwqiii
    At it's most basic, this should get you going
    In this simple example, data in B3:F3; simple sum answer in B5
    Alter to suit for varying data ranges etc.
    Please Login or Register  to view this content.
    Sorry but just haven't got time to work with your data at present
    Last edited by barryleajo; 06-30-2011 at 02:52 AM.

  4. #4
    Registered User
    Join Date
    05-26-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Removing column from calculation

    barryleajo,

    I can see how this works with hiding the columns and working with a coded calculation. I'm not sure I'm explaining correctly. I need to select columns on the data tab to be deleted from a cell formula calculation in another tab.

    Say data tab has columns labeled 1 to 10. The calculation tab uses 1 to 5 for the calculation. If I delete column 2 in the data tab I need that to be deleted in the calculation tab and then use 1,3,4,5,6. (so the next available column data is used). When I deselect the column it returns to to the calculation page.

    I hope this makes it clearer on what I'm trying to do.

  5. #5
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Removing column from calculation

    OK rwqiii
    I've done a bit of work with your data now.
    Try the attached to see if selects the correct data set.
    Hide some columns in the Data sheet and run macro called "calcminuscols()".
    It will take the first 30 data values that are not in hidden columns into the Calcuation sheet.
    Note only data in the first data row (row 7) is used in this example, just to test that this is what you are looking for.
    Note that I haven't built-in column select/deselect or error-checking etc.
    This may help you complete your requirement.
    Happy to work with you further if needs be.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-26-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Removing column from calculation

    barryleajo,

    Thanks for the help. I've tried this out and it looks very close to what I'm looking to do. I must admit I don't know arrays very well at all. How do you get this to move the other rows and still not include the designated columns?

    Thanks again Rick

  7. #7
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Removing column from calculation

    Hi Rick
    Check the attached.
    I think it does what you require.
    The loop is a bit "pedestrian" and I'm sure the 'filling' of the data can be speeded-up.
    First things first though - I'm still learning about manipulating arrays too!
    Barry
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-26-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Removing column from calculation

    Thanks for the help barryleajo,

    This project is going so for me. Sorry for the long response time. I hope I can take a look at this soon and let you know how things work.

    Rick

  9. #9
    Registered User
    Join Date
    05-26-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Removing column from calculation

    barryleajo,

    Thanks for all the help. I got what I needed and was finally able to get things working correctly.

    Thanks again,

    Rick

+ 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