+ Reply to Thread
Results 1 to 12 of 12

Subtracting feet and inches while maintaining format

  1. #1
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Subtracting feet and inches while maintaining format

    Hello everyone, new here. I joined cause I have a question. How do I subtract from column H? I am trying to subtract just 6 inches from the value in column H repeatedly and keeping it in the same format?


    PUMP FOUNDATION FDN.JPG
    Attached Files Attached Files
    Last edited by echeverriajii; 10-22-2020 at 12:30 PM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Subtracting feet and inches while maintaining format

    Any chance of posting an xlsx file instead of xls?

  3. #3
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Re: Subtracting feet and inches while maintaining format

    I just added it.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,813

    Re: Subtracting feet and inches while maintaining format

    What flexibility do you have and what is absolutely unchangeable? The real challenge with something like this is that "80'-5 7/8"" is a text string that has no numeric meaning to Excel. So the bulk of the work is parsing/manipulating the text string to get a meaningful number, perform the subtraction (the easy part), then parse the result back into text format.

    If you have the flexibility, here's how I would set something like this up.

    1) For the calculation part, I don't want any text strings, so I would enter these numbers in a way that they are meaningful numbers. Decimal inches might be easiest. Picking a random column to store the numbers (K), enter =80*12+6 into K3, same in K4, =80*12+5 7/8 in K5 and so on. It's a bit of a tedious way to enter the data, but should be no less tedious than entering the text strings currently in column H.
    2) Perform the subtraction in column L. =K3-6 copied down.
    3) Column H can convert the number in K into the desired text string. =FLOOR(K3,12)/12&"'-"&TEXT(MOD(K3,12),"# ##/##")&CHAR(34). Copy down as far as need. Copy into column I to get the result of subtraction.

    Use a similar strategy for any other "numbers" in the table that you need to perform calculations on. I don't know if you will like this approach, but something like that is how I would do this.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Re: Subtracting feet and inches while maintaining format

    Well, thank you for your help MrShorty. I am doing data extractions from autocad and the text string format is what the company uses. So every column you see was populated by autocad data extraction. This is just a sample schedule I created to test my idea. Most of their schedules are over 100 foundations and hard to keep track of. Right now they type everything by hand and believe me they make tons of mistakes. What I am trying to do take what is in column H Top of concrete is 80'-6" and I just need to show top of grout 80'-0". I want to make it to where nothing has to be hand typed to avoid the mistakes they make now. Let me see if I can use the information you provided and hopefully turn the text string into decimal without typing any of it.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,813

    Re: Subtracting feet and inches while maintaining format

    I know almost nothing about AutoCad, but I would expect that it should be possible to include a "decimal feet" or "decimal inches" column in what AutoCad outputs. Would you be allowed to go back to AutoCad and modify the output so you get a decimal inch or decimal feet column?

  7. #7
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Re: Subtracting feet and inches while maintaining format

    I was thinking about doing just that. If I were to extract it in decimal format and then take your string you sent earlier, I wonder if that would change it to architectural units. Let me try it.

  8. #8
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Re: Subtracting feet and inches while maintaining format

    It worked. Thank you sir.

  9. #9
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Re: Subtracting feet and inches while maintaining format

    Just one question, how would you limit the denominator down to a 1/16? Right now the denominator is 1/57. Here is the string I used. =FLOOR(I3,12)/12&"'-"&TEXT(MOD(I3,12),"# ##/##")&CHAR(34)

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,813

    Re: Subtracting feet and inches while maintaining format

    I would do something to round I3 to the nearest 16th. If Autocad cannot output values to the nearest 16th, then use Excel's MROUND() function somewhere. =MROUND(I3,1/16) in a helper column, or nested inside of the previous function =FLOOR(MROUND(I3,1/16),12)/12....

  11. #11
    Registered User
    Join Date
    10-22-2020
    Location
    Houston, Texas
    MS-Off Ver
    ten
    Posts
    8

    Re: Subtracting feet and inches while maintaining format

    I limited the decimal to two decimal places in autocad. I am going to try MROUND. Is it possible to add that in to this =FLOOR(I3,12)/12&"'-"&TEXT(MOD(I3,12),"# ##/##")&CHAR(34)? By the way, what does "&CHAR(34) do? I am trying to understand all of it. I appreciate all your help.

  12. #12
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,813

    Re: Subtracting feet and inches while maintaining format

    As I tried to show, replace all of the instances of I3 with MROUND(I3,1/16). My previous post shows the FLOOR() part, the MOD part would be ...MOD(MROUND(I3,1/16),12)...

    Because Excel uses the quotation mark character to indicate string literals within a formula, it can be a challenge to include a quotation mark character as part of a formula. 34 is the ASCII character code for the quotation mark character, so I used the CHAR() function rather than try to figure out the correct nesting of quotation marks to get a single quotation mark character in the output.

+ 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] convert feet-inches-sixtennths to feet standard dimensions
    By Paul Morgan in forum Excel General
    Replies: 4
    Last Post: 10-29-2019, 03:28 PM
  2. custon format for inches and feet
    By Delta729 in forum Excel General
    Replies: 5
    Last Post: 03-31-2018, 08:41 PM
  3. Format cell to convert inches to feet
    By Obfuscated in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-13-2017, 12:51 PM
  4. Replies: 13
    Last Post: 08-21-2015, 02:27 PM
  5. Replies: 1
    Last Post: 02-28-2006, 08:00 PM
  6. [SOLVED] Special format for feet - inches in a cell
    By Bothell John in forum Excel General
    Replies: 1
    Last Post: 09-07-2005, 09:05 PM
  7. format number in feet and inches
    By emerald in forum Excel General
    Replies: 1
    Last Post: 02-23-2005, 02:06 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