+ Reply to Thread
Results 1 to 14 of 14

Need major help with calculating Sq. Footage from a range of cells

  1. #1
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Question Need major help with calculating Sq. Footage from a range of cells

    I have attached worksheet that I am in the process of creating for work. It is used for transferring materials. When you open the worksheet up I would like some help on programming some code that would allow me to take the Dimensions that a user enters in (Column G) and depending on the QTY (Column E) I could at the bottom of (Column G), lets say cell G29 could provide the square footage sum based upon what was entered by the user.

    Any help would be greatly appreciated!!


    Example.xlsm

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Enter the figures first the quantity in column E and then the dimensions in column G and exit the cell. Please note that since you wanted to calculate the area, the macro takes into account only the length and width, not the height.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Need major help with calculating Sq. Footage from a range of cells

    Quote Originally Posted by Mumps1 View Post
    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Enter the figures first the quantity in column E and then the dimensions in column G and exit the cell. Please note that since you wanted to calculate the area, the macro takes into account only the length and width, not the height.
    Please Login or Register  to view this content.
    So does this take an account for more than one line? It seems to only give me a total of 1 cell, can it be written so it totals all of the cells from G2:G28 and the total square footage?
    Last edited by nealasmothers; 10-01-2015 at 03:34 PM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    Try:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Need major help with calculating Sq. Footage from a range of cells

    Quote Originally Posted by Mumps1 View Post
    Try:
    Please Login or Register  to view this content.
    Mumps this is now calculating the sum, but if I go back and change my QTY after it finishes the calculation it won't update.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    Replace this line:
    Please Login or Register  to view this content.
    with this one:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Need major help with calculating Sq. Footage from a range of cells

    Quote Originally Posted by Mumps1 View Post
    Replace this line:
    Please Login or Register  to view this content.
    with this one:
    Please Login or Register  to view this content.
    Now it works Mumps!! Question, now when I change the QTY its not recalculating anything, its just adding to whatever the first calculation came out to be. Not sure what's going on.

    I really appreciate you helping me fix this!

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    I tried it on the file you posted and it worked properly. I had to unmerge the cells in row 29 first. The macro is designed to calculate all the dimensions from G2 to G28 taking into account the quantity in column E. Every time you change a cell in column E or a cell in column G, everything should be recalculated. Click this link to download your file: https://app.box.com/s/u3cniygca9r0jvhuvfkvu3ncan71tjj2

  9. #9
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Need major help with calculating Sq. Footage from a range of cells

    Quote Originally Posted by Mumps1 View Post
    I tried it on the file you posted and it worked properly. I had to unmerge the cells in row 29 first. The macro is designed to calculate all the dimensions from G2 to G28 taking into account the quantity in column E. Every time you change a cell in column E or a cell in column G, everything should be recalculated. Click this link to download your file: https://app.box.com/s/u3cniygca9r0jvhuvfkvu3ncan71tjj2
    Your right it does work, thanks so much for helping me!

    Let me ask you this, would there be a way to if I setup a table with a list of boats and in that table I had information about how much each specific boat can hold as far as tonnage and the total square footage it has available. Could excel based upon the Square footage number calculated / total weight of all items show in a drop down the boats it would fit?

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    I think that it would be easier to follow if I could see your file. Could you please post a copy with a detailed explanation of what you would like to do.

  11. #11
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Need major help with calculating Sq. Footage from a range of cells

    CMRRedoExample.xlsm

    I have attached my file Mumps, if you open it you will see an additional sheet. The one that says Sheet1 is where all of the data I believe you would need to understand what I would like to do. Once the user gets the total Sq. Footage from G29, I would like in K29 for a dropdown list to appear and based upon the number in G29, it would only show the boats that could possibly take the entire square footage amount. I'm thinking this would involve the VLOOKUP command but I’m not sure where I would begin.

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    Try:
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    02-23-2014
    Location
    Shreveport, LA
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Need major help with calculating Sq. Footage from a range of cells

    Quote Originally Posted by Mumps1 View Post
    Try:
    Please Login or Register  to view this content.
    Worked perfect just like your other one!! Thanks so much for the help!

  14. #14
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need major help with calculating Sq. Footage from a range of cells

    Glad to help.

+ 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. Calculating max range when formula is in the cells
    By kmakjop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2014, 11:14 AM
  2. [SOLVED] Formula for Calculating Square Footage
    By mknewnham in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-16-2014, 08:34 AM
  3. Automatically Add a Blank Row Before all Cells Containing 'Major Line'???
    By kdanilko in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2013, 10:19 AM
  4. Replies: 7
    Last Post: 01-31-2011, 06:26 AM
  5. Calculating Moving Range with Blank Cells
    By montego in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-16-2010, 11:20 AM
  6. Processing/Calculating Range Of Cells
    By EdAROC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2008, 09:37 AM
  7. Range - Offset (Major help needed)
    By VBA Noob in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2006, 12:58 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