Formula to populate a field with yes based on time value

Paul15

New Member
Joined
Jun 25, 2020
Messages
44
Office Version
  1. 2019
Platform
  1. Windows
Hi I have a spreadsheet using a data input form with VBA in the background. on the form a user enters a 'start time' and 'finish time' with code working out the 'total time'. Now i need to be able to use this total time to either generate a power query if total time > than 01:00 (1hr), or set a field to 'yes' if the total time is > than 01:00. If we go the later way i can use the 'yes' in a query to generate the results I want.

i was thinking a simple =if(A1>01:00,"Yes","No") but this does not appear to work

any pointers please

Paul
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Review the alternatives below with Excel's Formula Evaluate.

Time.xlsm
ABCDE
1StartEndTime01:00
207:5008:1500:25NoNo
307:3009:3002:00YesYes
4
5a
Cell Formulas
RangeFormula
C2:C3C2=B2-A2
D2:D3D2=IF(C2>$E$1,"Yes","No")
E2E2=IF(C2>TIME(1,0,0),"Yes","No")
E3E3=IF(C3>TIME(1,,),"Yes","No")
 
Upvote 0
Review the alternatives below with Excel's Formula Evaluate.

Time.xlsm
ABCDE
1StartEndTime01:00
207:5008:1500:25NoNo
307:3009:3002:00YesYes
4
5a
Cell Formulas
RangeFormula
C2:C3C2=B2-A2
D2:D3D2=IF(C2>$E$1,"Yes","No")
E2E2=IF(C2>TIME(1,0,0),"Yes","No")
E3E3=IF(C3>TIME(1,,),"Yes","No")
Hi Dave,

that's great

I was working on something similar but did not pick up on putting my definite value 01:00 in a cell and working from that, so great. I have implemented the formula and it works.

I have copied the formula down to my last line of data and it picks up all those instances I want.

My hope is that for the next line of data entered through my Input form, the formula is automatically picked up on that line. I have multiple users in multiple area, all using the spreadsheet in SharePoint, so lots of data coming in. I don't want to have to drag the formula down the column to a million and one.

can the formula be set so it reflects the column it is in? my column AX, so as each new peice of data comes in the formula automatically is picked up?

Regards

Paul
 
Upvote 0
"can the formula be set so it reflects the column it is in? my column AX, so as each new peice of data comes in the formula automatically is picked up?"

The formula could increment down if it was part of a Table.

If the formula does not increment down, you can start a new thread.
Explain clearly what you require and post a concise example.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top