# Excel to Eureka function

60 views

### Dave

Mar 15, 2023, 2:55:10 PMMar 15
to
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

### Martyn Ellis

Mar 15, 2023, 5:48:11 PMMar 15
to
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

### Martyn Ellis

Mar 15, 2023, 6:27:10 PMMar 15
to
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".

Cheers

Martyn Ellis

### Dave

Mar 16, 2023, 3:54:36 AMMar 16
to
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

### Martyn Ellis

Mar 16, 2023, 5:17:37 PMMar 16
to
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

### Dave

Mar 17, 2023, 3:47:52 AMMar 17
to
Martyn Ellis <martyn....@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

### M Harding

Mar 17, 2023, 7:08:09 AMMar 17
to
In article <5a8673f...@triffid.co.uk>,
Dave <da...@triffid.co.uk> wrote:
> In article <f8ba1423-09e7-48d0...@googlegroups.com>,
> Martyn Ellis <martyn....@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 ris...@mdharding.org.uk

### Dave

Mar 17, 2023, 12:42:19 PMMar 17
to
In article <5a8685a4...@mdharding.org.uk>,
M Harding <ris...@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

### Dave

Mar 17, 2023, 3:09:41 PMMar 17
to

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

### David Higton

Mar 17, 2023, 4:01:25 PMMar 17
to
In message <5a8685a4...@mdharding.org.uk>
M Harding <ris...@mdharding.org.uk> wrote:

> [Does anyone remember Tippex?]

My screen used to be covered in it.

David

### M Harding

Mar 17, 2023, 4:45:13 PMMar 17
to
In article <b628b7865a.DaveMeUK@BeagleBoard-xM>,
8-)

### M Harding

Mar 17, 2023, 4:45:16 PMMar 17
to
In article <5a86a4e...@triffid.co.uk>,
Dave <da...@triffid.co.uk> wrote:
> In article <5a8685a4...@mdharding.org.uk>,
> M Harding <ris...@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.

### Dave

Mar 17, 2023, 4:56:57 PMMar 17
to
In article <b628b7865a.DaveMeUK@BeagleBoard-xM>,
David Higton <da...@davehigton.me.uk> wrote:
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

### b.b...@bcs.org

May 15, 2023, 12:18:05 PMMay 15
to
On 15 Mar 2023, da...@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.b...@bcs.org