PDA

View Full Version : Solved: Increment Formula With If Statement



Spaggiari
08-06-2012, 08:22 AM
Hey everyone, I'd like to know, if its possible, how to increment a formula with an If statement that transforms 2 values in time format and then as long as these two values keep beeing added in the cells the formula keeps active in the column.

I tried to apply the code for all the but this makes my file huge like 20MB!

You can check this on the file, go the "records" sheet, add the time in the "shift start" and "shift end" fields, then the difference value goes to "hours" in the sheet.

https://www.dropbox.com/s/ouda3vdcu0buefh/project.xlsm (https://www.dropbox.com/s/ouda3vdcu0buefh/project.xlsm)

Thx in advance!
:beerchug:

Spaggiari
08-09-2012, 03:13 AM
Anyone? :whistle:

Bob Phillips
08-09-2012, 03:36 AM
Do you mean you want any changes to be added in a running, single-cell total? This would need VBA.

Spaggiari
08-09-2012, 05:11 AM
Do you mean you want any changes to be added in a running, single-cell total? This would need VBA.

Yes! Thx for the reply.

You can check my project here > https://www.dropbox.com/s/ouda3vdcu0buefh/project.xlsm (https://www.dropbox.com/s/ouda3vdcu0buefh/project.xlsm)

:beerchug:

Spaggiari
08-10-2012, 02:12 AM
Yes! Thx for the reply.

You can check my project here > https://www.dropbox.com/s/ouda3vdcu0buefh/project.xlsm (https://www.dropbox.com/s/ouda3vdcu0buefh/project.xlsm)

:beerchug:

Link updated > https://www.dropbox.com/s/qb2m9a7a6at7e68/project.xlsm (https://www.dropbox.com/s/qb2m9a7a6at7e68/project.xlsm)

snb
08-10-2012, 03:39 AM
Please post a sample workbook here....

Spaggiari
08-10-2012, 03:46 AM
Please post a sample workbook here....

https://www.dropbox.com/s/qb2m9a7a6at7e68/project.xlsm

Done!

snb
08-10-2012, 04:41 AM
Thanks.

I had a look and can't figure out what your question is.

In B7 this formula may suffice: =IF(R7<>"";R7-Q7)

Spaggiari
08-10-2012, 05:33 AM
Thanks.

I had a look and can't figure out what your question is.

In B7 this formula may suffice: =IF(R7<>"";R7-Q7)

=IF(R7<>"";R7-Q7,"")

Changed it a little bit.

I want the formula be added cell by cell only if there are values in the start time and end time. If I apply the formula to the whole column the file goes from 500kb to 9MB.

Ty

Spaggiari
08-10-2012, 06:02 AM
=IF(R7<>"";R7-Q7,"")

Changed it a little bit.

I want the formula be added cell by cell only if there are values in the start time and end time. If I apply the formula to the whole column the file goes from 500kb to 9MB.

Ty

Actually the formula is wrong because when it calcutes a value like 23:00 and the other value is inferior like 07:00 an error comes in!

I'm gonna stay with my formula for now.

Ty

Spaggiari
08-20-2012, 02:40 AM
This is what I came up with, created a table and applied a formula to the fields and its working fine.

You can take a look here https://www.dropbox.com/s/qb2m9a7a6a...project.xlsm?m (https://www.dropbox.com/s/qb2m9a7a6a...project.xlsm?m)

Ty