ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Converting to seconds (https://www.excelbanter.com/excel-programming/316682-converting-seconds.html)

Ramthebuffs

Converting to seconds
 

Hey guys, I've been racking my brain on this for a while, its now lat
and I give up. Hopefully somebody can help.

Basically the information I get counts seconds until you get to on
minute, then it changes to 100. So pretty much what I need is t
subtract 40 from 100 -159 and subtract 80 from 200-259. The number
don't really go any higher. There are numbers below 100 as well.
started some code below, but its not really working because it stil
subtracts 40 from numbers under 1 minute(100). I'm sure you can tel
I'm an amateur, just got stuck here. Any help would be greatl
appreciated.

Oh yeah, I'm converting AC1:AC10 in this manner.


If Range("AC1") 59.99 Then Range("CC1").Value = Range("ac1") - 40
Range("AC1").Select
ActiveCell.FormulaR1C1 = "=RC[52]"
ElseIf Range("AC1") < 59.99 Then Range ?????
End I

--
Ramthebuff
-----------------------------------------------------------------------
Ramthebuffs's Profile: http://www.excelforum.com/member.php...fo&userid=1642
View this thread: http://www.excelforum.com/showthread.php?threadid=27796


Tom Ogilvy

Converting to seconds
 
Dim cell as Range
For each cell in Range("AC1:AC10")
Select Case cell.Value
Case 0 to 99.99
Cells(cell.row,"CC").Value = cell.Value
Case 99.99 to 199.99
Cells(cell.row,"CC").Value = cell.Value - 40
Case 199.99 to 299.99
Cells(cell.row,"CC").Value = cell.Value - 80
End Select
Next


--
Regards,
Tom Ogilvy


"Ramthebuffs" wrote in message
...

Hey guys, I've been racking my brain on this for a while, its now late
and I give up. Hopefully somebody can help.

Basically the information I get counts seconds until you get to one
minute, then it changes to 100. So pretty much what I need is to
subtract 40 from 100 -159 and subtract 80 from 200-259. The numbers
don't really go any higher. There are numbers below 100 as well. I
started some code below, but its not really working because it still
subtracts 40 from numbers under 1 minute(100). I'm sure you can tell
I'm an amateur, just got stuck here. Any help would be greatly
appreciated.

Oh yeah, I'm converting AC1:AC10 in this manner.


If Range("AC1") 59.99 Then Range("CC1").Value = Range("ac1") - 40
Range("AC1").Select
ActiveCell.FormulaR1C1 = "=RC[52]"
ElseIf Range("AC1") < 59.99 Then Range ?????
End If


--
Ramthebuffs
------------------------------------------------------------------------
Ramthebuffs's Profile:

http://www.excelforum.com/member.php...o&userid=16429
View this thread: http://www.excelforum.com/showthread...hreadid=277962





All times are GMT +1. The time now is 04:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com