• Excel to Eureka function

    From Dave@21:1/5 to All on Wed Mar 15 18:55:01 2023
    Hi folks,
    I have little spreadsheet problem and wonder if anyone here can help with
    the Eureka side.

    In an MS-Win side Excel spreadsheet, I have a function that gives the
    number of days between two dates.

    Cell C2 contains today date from =TODAY()
    Cell D2 contains the date from which the days need to be calculated.

    Cell C4 contains the function =DAYS(c2,d2) which does the calculation.
    This works okay in Excel, but doesn't work in Eureka.

    Is there a comparable function in Eureka that will perform the same action?

    Thanks
    Dave

    --

    Dave Triffid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martyn Ellis@21:1/5 to Dave on Wed Mar 15 14:48:10 2023
    On Wednesday, 15 March 2023 at 18:55:10 UTC, Dave wrote:
    Hi folks,
    I have little spreadsheet problem and wonder if anyone here can help with
    the Eureka side.

    In an MS-Win side Excel spreadsheet, I have a function that gives the
    number of days between two dates.

    Cell C2 contains today date from =TODAY()
    Cell D2 contains the date from which the days need to be calculated.

    Cell C4 contains the function =DAYS(c2,d2) which does the calculation.
    This works okay in Excel, but doesn't work in Eureka.

    Is there a comparable function in Eureka that will perform the same action?

    Thanks
    Dave

    --

    Dave Triffid

    Hi Dave

    I am by no means a Eureka expert, but as far as I can see the following approach seems to work OK.

    Cell A1 - input the date from which the days need to be calculated - dd/mm/yyyy format.
    Cell A2 - input the function TODAY() - paste in this function from 'Formula Menu', 'Paste Function' Sub Menu, Category 'Date & Time'.
    Cell A3 - input formula "=A1-B1"

    I assume that you can juggle how those cells are arranged to suit the rest of your sheet.

    Hope that helps (and that this reply lands OK where it should - my first ever post into this forum!)

    Cheers

    Martyn Ellis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martyn Ellis@21:1/5 to All on Wed Mar 15 15:27:09 2023
    Hi Dave

    So sorry - I have just realised that my earlier post contains a major error - sigh!!

    Last line should, of course, read: Cell A3 - input formula "=A1-A2".

    Sorry about that.

    Cheers

    Martyn Ellis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave@21:1/5 to Martyn Ellis on Thu Mar 16 07:54:03 2023
    In article <58504fe8-d95f-49b3-ba49-f5b2d4223ad5n@googlegroups.com>,
    Martyn Ellis <martyn.ellis12@gmail.com> wrote:
    On Wednesday, 15 March 2023 at 18:55:10 UTC, Dave wrote:
    Hi folks,
    I have little spreadsheet problem and wonder if anyone here can help with the Eureka side.

    In an MS-Win side Excel spreadsheet, I have a function that gives the number of days between two dates.

    Cell C2 contains today date from =TODAY()
    Cell D2 contains the date from which the days need to be calculated.

    Cell C4 contains the function =DAYS(c2,d2) which does the calculation.
    This works okay in Excel, but doesn't work in Eureka.

    Is there a comparable function in Eureka that will perform the same
    action?

    Thanks
    Dave

    --

    Dave Triffid

    Hi Dave

    I am by no means a Eureka expert, but as far as I can see the following approach seems to work OK.

    Cell A1 - input the date from which the days need to be calculated - dd/mm/yyyy format. Cell A2 - input the function TODAY() - paste in this function from 'Formula Menu', 'Paste Function' Sub Menu, Category 'Date
    & Time'. Cell A3 - input formula "=A1-B1"

    I assume that you can juggle how those cells are arranged to suit the
    rest of your sheet.

    See Nb:

    Hope that helps (and that this reply lands OK where it should - my first
    ever post into this forum!)

    Cheers
    Martyn Ellis

    Thanks for the thoughts Martyn. :-)

    Welcome to this place, and obviously both your postings came through okay.

    Though also not an expert, I have been using Eureka since it was first
    released in 1992 and it was upon it (Eureka) that much of my old business
    was run. Pricing works, accounts, time sheets, etc...

    The sheet in question does already exist in both Excel and Eureka and my
    aim was to tidy up the formula and functions differences between the two.

    The Eureka sheet already works by the method you note, but I was hoping
    the "=Days(cell,cell)" or something similar was in Eureka, but obviously
    not.

    Development work on Eureka ceased in 1995 with a couple of minor tweaks
    in 1996 to cope with the arrival of the "Strong Arm Card" in Acorn SARPC computers.

    The "=Days(cell,cell)" does exist in another RISC OS Spreadsheet app, Fireworkz, but in my now long time retired life, there's no point in
    changing to a different app.

    Thanks again for the thoughts. :-)

    Dave

    Nb: Certain formulas I make absolute so they can be copied anywhere in the sheet.

    Eg: =$B$2-$C$2

    D.

    --

    Dave Triffid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martyn Ellis@21:1/5 to All on Thu Mar 16 14:17:36 2023
    Hi Dave

    So sorry for having (unintentionally) suggested that you might like to try sucking some proverbial eggs - I'm afraid that I hadn't fully grasped from your initial message what it was that you're trying to achieve. Having seen your last message, I
    realise that you were way ahead of me already as regards the niceties of !Eureka.

    Only thing to add is that, having had a quick scan through the !Eureka manual earlier today, I did find mention of a function 'DAYS360', which seems to work and use syntax very much like your Excel one - except that (very bizarrely) it calculates the
    number of days between two dates on the assumption that a year consists of 12 months of 30 days each!! Definitely no mention of a 'DAYS' function exactly like the one in Excel. Why that should be there but not the precise function that you're looking
    for is a bit of a mystery - except that I guess it was a whole lot easier to program!

    Anyway, good luck with trying to sort out the tidying up of your sheets.

    Cheers

    Martyn Ellis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave@21:1/5 to Martyn Ellis on Fri Mar 17 07:47:18 2023
    In article <f8ba1423-09e7-48d0-9677-18aa0393cc10n@googlegroups.com>,
    Martyn Ellis <martyn.ellis12@gmail.com> wrote:
    Hi Dave

    So sorry for having (unintentionally) suggested that you might like to
    try sucking some proverbial eggs - I'm afraid that I hadn't fully
    grasped from your initial message what it was that you're trying to
    achieve. Having seen your last message, I realise that you were way
    ahead of me already as regards the niceties of !Eureka.

    Martyn.
    I honestly didn't reply from that angle, I just appreciated you taking the
    time to make a useful suggestion. :-)

    I'm always up for a bit of learning even in my dotage. :-) (Rhenium).
    So no eggs were consumed during the chat. :-)

    Only thing to add is that, having had a quick scan through the !Eureka
    manual earlier today, I did find mention of a function 'DAYS360', which
    seems to work and use syntax very much like your Excel one - except that (very bizarrely) it calculates the number of days between two dates on
    the assumption that a year consists of 12 months of 30 days each!!
    Definitely no mention of a 'DAYS' function exactly like the one in
    Excel. Why that should be there but not the precise function that you're looking for is a bit of a mystery - except that I guess it was a whole
    lot easier to program!

    Indeed, that is a really weird function, which I did use in the past with
    an added +5 to get a closer answer. =DAYS360(C26,B26)+5 :-(

    I do have a copy of the Eureka manual, unfortunately in the past when we
    were doing a major redecoration, it was, with a lot of other stuff boxed
    up and put in the loft out of the way, but never brought down again...

    My oh my, the amount of stuff that gets consigned to the loft in a life
    time can be boggling. (Well the married bit of the lifetime).

    I'm waffling again... But I must pop up into the loft and bring a few
    manuals back down again.

    Anyway, good luck with trying to sort out the tidying up of your sheets.

    Cheers
    Martyn Ellis

    Thanks, appreciated the conversation.

    Dave

    --

    Dave Triffid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From M Harding@21:1/5 to Dave on Fri Mar 17 11:00:19 2023
    In article <5a8673f864dave@triffid.co.uk>,
    Dave <dave@triffid.co.uk> wrote:
    In article <f8ba1423-09e7-48d0-9677-18aa0393cc10n@googlegroups.com>,
    Martyn Ellis <martyn.ellis12@gmail.com> wrote:
    Hi Dave

    So sorry for having (unintentionally) suggested that you might
    like to try sucking some proverbial eggs - I'm afraid that I
    hadn't fully grasped from your initial message what it was that
    you're trying to achieve. Having seen your last message, I
    realise that you were way ahead of me already as regards the
    niceties of !Eureka.

    Don't worry Martyn, I'm the leader of that club, having mistaken
    Dave's level of questioning so many times we've become good friends
    over it!

    Martyn. I honestly didn't reply from that angle, I just appreciated
    you taking the time to make a useful suggestion. :-)

    I used PipeDream for many years - for text, spreadsheets and
    databases. It was my workhorse program. (I only started using a BBC B
    because I couldn't type accurately, had no secretary and it was better
    than Tippex.) [Does anyone remember Tippex?]

    I discovered a lot of useful tricks over the years. One, is that if I
    use numerical slots,
    and put the date into A1 (as 17.3.23) it shows as <17 Mar 2023>
    If in A2 I insert A1+7 the slot returns <24 Mar 2023>.
    If in A3 I insert A2-A1 the slot returns <7>

    Is there no such facility in Eureka?

    (At this point, Martyn, I usually discover I've totally misunderstood
    the nature of the question.)

    I'm always up for a bit of learning even in my dotage. :-)
    (Rhenium). So no eggs were consumed during the chat. :-)

    I daren't get Pipedream to do the sum. It's nearly +10 years.

    Michael Harding
    Rev. Preb. M.D. Harding riscos@mdharding.org.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave@21:1/5 to M Harding on Fri Mar 17 16:42:05 2023
    In article <5a8685a47ariscos@mdharding.org.uk>,
    M Harding <riscos@mdharding.org.uk> wrote:

    [Snip]

    ...than Tippex.) [Does anyone remember Tippex?]

    Hi Michael, what fun... :-)
    Yes, I still have a bottle of Tippex correction fluid here on my office
    desk... Mmnn! Come to think about it, I also have a Tippex snail
    correction tape, and still use both... :-)

    I discovered a lot of useful tricks over the years. One, is that if I
    use numerical slots,
    and put the date into A1 (as 17.3.23) it shows as <17 Mar 2023>
    If in A2 I insert A1+7 the slot returns <24 Mar 2023>.
    If in A3 I insert A2-A1 the slot returns <7>

    Is there no such facility in Eureka?

    Yes that works the same in Eureka providing you've set the cell to display
    a date as "dd mmm yyyy" (Sans quotes).


    (At this point, Martyn, I usually discover I've totally misunderstood
    the nature of the question.)

    [Snip]

    Michael, you were kind of on the same track as our chat, though we were specifically noting the lack off, or the inaccurate results of a Function.

    But then I'm quite often confused myself, as you know. :-/

    The original question was about the function. "=Days(cell,cell)" Which for
    some reason does not exist in Eureka.

    Followed by a similar but inaccurate function "=DAYS360(C2,B2)" which I modified to make the inaccurate result a little closer to reality. "=DAYS360(C2,B2)+5"

    This of course can be overcome in Eureka by using the formula...

    "=$B$2-$C$2" Where B2 has todays date "=TODAY()" and C2 has the start date
    "17 Mar 2022" (Sans quotes).

    Anyway, whatever... It's nice to chat with friends.

    Dave

    --

    Dave Triffid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave@21:1/5 to All on Fri Mar 17 19:09:16 2023
    And...
    Of course, if a person was clever they could write their own Eureka "Days" Function Macro.

    Unfortunately my Eureka knowledge base is postage stamp sized, so that's
    out of the question for me. :-(

    Dave

    --

    Dave Triffid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Higton@21:1/5 to M Harding on Fri Mar 17 20:01:10 2023
    In message <5a8685a47ariscos@mdharding.org.uk>
    M Harding <riscos@mdharding.org.uk> wrote:

    [Does anyone remember Tippex?]

    My screen used to be covered in it.

    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From M Harding@21:1/5 to David Higton on Fri Mar 17 20:34:04 2023
    In article <b628b7865a.DaveMeUK@BeagleBoard-xM>,
    David Higton <dave@davehigton.me.uk> wrote:
    In message <5a8685a47ariscos@mdharding.org.uk>
    M Harding <riscos@mdharding.org.uk> wrote:

    [Does anyone remember Tippex?]

    My screen used to be covered in it.

    8-)

    Michael Harding
    Rev. Preb. M.D. Harding riscos@mdharding.org.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From M Harding@21:1/5 to Dave on Fri Mar 17 20:32:54 2023
    In article <5a86a4ee87dave@triffid.co.uk>,
    Dave <dave@triffid.co.uk> wrote:
    In article <5a8685a47ariscos@mdharding.org.uk>,
    M Harding <riscos@mdharding.org.uk> wrote:

    [Snip]

    ...than Tippex.) [Does anyone remember Tippex?]

    Hi Michael, what fun... :-) Yes, I still have a bottle of Tippex
    correction fluid here on my office desk... Mmnn! Come to think
    about it, I also have a Tippex snail correction tape, and still use
    both... :-)

    I discovered a lot of useful tricks over the years. One, is that
    if I use numerical slots,

    and put the date into A1 (as 17.3.23) it shows as <17 Mar 2023>
    If in A2 I insert A1+7 the slot returns <24 Mar 2023>.
    If in A3 I insert A2-A1 the slot returns <7>

    Is there no such facility in Eureka?

    Yes that works the same in Eureka providing you've set the cell to
    display a date as "dd mmm yyyy" (Sans quotes).

    In Pipedream any numerical slot is a date slot if presented as e.g.
    27.3.23


    (At this point, Martyn, I usually discover I've totally
    misunderstood the nature of the question.)

    [Snip]

    Michael, you were kind of on the same track as our chat, though we
    were specifically noting the lack off, or the inaccurate results of
    a Function.

    But then I'm quite often confused myself, as you know. :-/

    The original question was about the function. "=Days(cell,cell)"
    Which for some reason does not exist in Eureka.

    Followed by a similar but inaccurate function "=DAYS360(C2,B2)"
    which I modified to make the inaccurate result a little closer to
    reality. "=DAYS360(C2,B2)+5"

    This of course can be overcome in Eureka by using the formula...

    "=$B$2-$C$2" Where B2 has todays date "=TODAY()" and C2 has the
    start date "17 Mar 2022" (Sans quotes).

    Anyway, whatever... It's nice to chat with friends.

    Par for the course then: I didn't grasp the subtleties. In this
    instance I plead Covid and being 'with the fairies'. I've already
    sent a response today to the wrong person.

    Michael Harding
    Rev. Preb. M.D. Harding riscos@mdharding.org.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave@21:1/5 to David Higton on Fri Mar 17 20:55:29 2023
    In article <b628b7865a.DaveMeUK@BeagleBoard-xM>,
    David Higton <dave@davehigton.me.uk> wrote:
    In message <5a8685a47ariscos@mdharding.org.uk>
    M Harding <riscos@mdharding.org.uk> wrote:

    [Does anyone remember Tippex?]

    My screen used to be covered in it.

    David


    Hehe! Do you remember the origins of that joke, I do, but these days one
    is not allowed to repeat it in a public space.

    That said, very appropriate considering it is St Patrick's day. :-)

    Dave

    --

    Dave Triffid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From b.boase@bcs.org@21:1/5 to dave@triffid.co.uk on Mon May 15 17:14:48 2023
    On 15 Mar 2023, dave@triffid.co.uk wrote:

    Cell C4 contains the function =DAYS(c2,d2) which does the calculation.
    This works okay in Excel, but doesn't work in Eureka.

    Just noticed this question and read through the replies.

    Eureka's DAYS360() is odd and inapplicable, and the only method of
    extending Eureka's set of functions is by defining a macro:
    DAYS(start, end).

    Trouble is, simple though such a macro is, it has to be in a separate file (called, say, 'M', of type &C2E 'EurMacro', preferably alongside sheets
    that use it) and those sheets refer to it not by
    =DAYS(cell,cell)
    but by
    =M!DAYS(cell,cell)
    (Reference from one sheet to another always involves putting a filename
    plus ! before a formula. See pp. B-35 and D-1 in the User Guide).

    Such a macro would look like this (in cells A1 to A4):

    DAYS
    =ARGUMENT("dStart",1
    =ARGUMENT("dEnd",1
    =RETURN(dEnd-dStart)

    Bernard
    --
    b.boase@bcs.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)