Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula to VBA please
Hello from Steved How do I please put the below in VBA for example it converts 2:24 to 1424 =HOUR(C2)*100+MINUTE(C2) ps yes I've Got Col C:C with about 200 to convert I Thankyou. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula to VBA please
Why dont you copy the formula down... The below code will have the converted value in colD Sub Macro() lngLastRow = ActiveSheet.Cells(Rows.Count, "c").End(xlUp).Row For lngRow = 2 to lngLastRow Range("D2") = HOUR(Range("C" & lngRow))*100+MINUTE(Range("C" & lngRow)) Next End Sub If this post helps click Yes --------------- Jacob Skaria "Steved" wrote: Hello from Steved How do I please put the below in VBA for example it converts 2:24 to 1424 =HOUR(C2)*100+MINUTE(C2) ps yes I've Got Col C:C with about 200 to convert I Thankyou. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula to VBA please
It's hard to say because you didn't tell us where you want the converted results... back in the same cell or in a different cell. Generally, you would use this... Cells(SomeRow, SomeColumn).Value = Format(Cells(2, "C").Value,"hhmm") -- Rick (MVP - Excel) "Steved" wrote in message ... Hello from Steved How do I please put the below in VBA for example it converts 2:24 to 1424 =HOUR(C2)*100+MINUTE(C2) ps yes I've Got Col C:C with about 200 to convert I Thankyou. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula | Excel Worksheet Functions | |||
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible | Excel Discussion (Misc queries) | |||
Formula expected end of statement error, typing formula into cell as part of VBA macro | Excel Programming | |||
Excel 2002 formula displayed not value formula option not checked | Excel Worksheet Functions | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |