+ Reply to Thread
Results 1 to 5 of 5

Flying Days

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Flying Days

    A
    B
    C
    1
    Inp
    Out
    2
    123 123---- B2: =FlyingDays(A2)
    3
    345 --345--
    4
    x7 123456-
    5
    x15 -234-67
    6
    1234567 1234567
    7
    x 1234567


    Please Login or Register  to view this content.
    Last edited by shg; 07-20-2014 at 03:18 PM.
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Registered User
    Join Date
    07-20-2014
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    3

    Re: Flying Days

    This looks great. I can test it on Monday. I don't have a pc right now. But it looks like i save the macro and then place the formula all the the way down a column. Did I understand this correctly?

    Looks very cool.

    Thanks

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Flying Days

    Yup -- open the VBE, Insert > Module, paste the code there.

    You're welcome.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Flying Days

    formula option unfortunately it gives missing in reverse order!
    =IF(A1="",1234567,IF(LEFT(A1)="x",SUBSTITUTE(7654321-SUMPRODUCT(MID(A1,COLUMN(INDIRECT("b"&":"&CHAR(64+LEN(A1)))),1)*10^(MID(A1,COLUMN(INDIRECT("b"&":"&CHAR(64+LEN(A1)))),1)-1)),0,"")+0,A1))
    A
    B
    1
    123
    123
    2
    345
    345
    3
    x1257
    643
    4
    13456
    13456
    5
    x234
    7651
    6
    1234567
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Flying Days

    revised formula
    =IF(A1="","1234567",IF(LEFT(A1)="x",SUBSTITUTE(1234567-SUMPRODUCT(MID(A1,COLUMN(INDIRECT("b"&":"&CHAR(64+LEN(A1)))),1)*10^(8-MID(A1,COLUMN(INDIRECT("b"&":"&CHAR(64+LEN(A1)))),1)-1)),0,""),A1&""))

    A
    B
    1
    x123 4567
    2
    x345 1267
    3
    x1257 346
    4
    x13456 27
    5
    x234 1567
    6
    1234567
    1234567
    7
    x1234567
    8
    367
    367
    9
    156
    156
    10
    x156 2347

+ 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. average flying aircraft monthly
    By guitarist00 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-10-2014, 08:48 AM
  2. Convert days -> Years, Months, Days, Hours, Minutes, Seconds
    By brharrii in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2012, 06:44 PM
  3. Calculating Flying hours allowing for GMT or BST
    By Joco in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2006, 10:05 AM
  4. Flying Bricks Chart
    By Irada Shamilova in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-01-2005, 06:05 PM
  5. Need to calculate flying hours
    By nchat76 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 05-16-2005, 03:24 AM

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