Calling Excel experts....

v8-powered
Posts: 2528
Joined: Mon Mar 16, 2020 7:37 pm
Location: Layer-de-la-Haye
Has thanked: 2249 times
Been thanked: 1243 times

Calling Excel experts....

Post by v8-powered »

I've got a sheet where I want to compare 2 units of data and then pick whichever hits its target first - one being an hours run figure and the the other being days elapsed (say 40000 hrs and 1000 days).

What formula should I use? I used be be pretty good an Excel but it must be 10 years since I've used it seriously!
Mussels
Posts: 4446
Joined: Mon Mar 16, 2020 9:02 pm
Has thanked: 839 times
Been thanked: 1242 times

Re: Calling Excel experts....

Post by Mussels »

I'm not sure I follow, do you have 2 columns of readings and you want to find the smallest in each or do you want to combine date & hours to find the first overall?
v8-powered
Posts: 2528
Joined: Mon Mar 16, 2020 7:37 pm
Location: Layer-de-la-Haye
Has thanked: 2249 times
Been thanked: 1243 times

Re: Calling Excel experts....

Post by v8-powered »

Mussels wrote: Mon Mar 07, 2022 3:21 pm I'm not sure I follow, do you have 2 columns of readings and you want to find the smallest in each or do you want to combine date & hours to find the first overall?
Sorry, my bad...

I've got 2 lots of data - operational days and running hours, and a formula running to bring both to a position where can be compared. The formula I now need is to compare both sets of data and to select whatever comes soonest - I'm currently using the IF command but seems a little flakey.

=ROUND(IF(TODAY()+E4<(TODAY()+(F4/$G$2)),TODAY()+E4),0) Where E4 is the operational days and (F4/$G$2) is taking hours run (F4) and dividing by average hours per day ($G$2) and giving a a part-day figure.

Cheers
Mussels
Posts: 4446
Joined: Mon Mar 16, 2020 9:02 pm
Has thanked: 839 times
Been thanked: 1242 times

Re: Calling Excel experts....

Post by Mussels »

I'm not sure about the F4/$G$2 part but to show the smaller result of the two something like this should work.

=IF(E4>(F4/$G$2),F4/$G$2,E4)
v8-powered
Posts: 2528
Joined: Mon Mar 16, 2020 7:37 pm
Location: Layer-de-la-Haye
Has thanked: 2249 times
Been thanked: 1243 times

Re: Calling Excel experts....

Post by v8-powered »

Mussels wrote: Mon Mar 07, 2022 6:34 pm I'm not sure about the F4/$G$2 part but to show the smaller result of the two something like this should work.

=IF(E4>(F4/$G$2),F4/$G$2,E4)
Cheers, I'll give that a try tomorrow.
Kneerly Down
Posts: 719
Joined: Wed Apr 22, 2020 11:30 am
Has thanked: 164 times
Been thanked: 308 times

Re: Calling Excel experts....

Post by Kneerly Down »

Mussels wrote: Mon Mar 07, 2022 6:34 pm I'm not sure about the F4/$G$2 part but to show the smaller result of the two something like this should work.

=IF(E4>(F4/$G$2),F4/$G$2,E4)
Easier to just use =MIN(E4,F4/$G$2)