Friends,
I am just using the below ROUND function to avoid the decimals in my excel.
=ROUND((((S4/X4)/3600)/9),0)
Can anyone help me to write the same formula in VBA coding.
Thanks,
Saky![]()
Friends,
I am just using the below ROUND function to avoid the decimals in my excel.
=ROUND((((S4/X4)/3600)/9),0)
Can anyone help me to write the same formula in VBA coding.
Thanks,
Saky![]()
Last edited by Saky; 12-03-2010 at 12:01 PM.
Why do you want it in VBA, how will you use it?
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Roy,
I am just having a try in converting all the simple formulas to VBA code. For simple multiplication i have converted to a VBA code like
So as the same way i need to convert the formula into code...Is that can be done using VBA.![]()
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim isect As Range If Target.Cells.Count > 1 Then Exit Sub On Error GoTo ResetApplication Application.EnableEvents = False Set isect = Intersect(Target, Range("O3:O20")) If Not isect Is Nothing Then If Target <> "" Then Range("Q" & Target.Row) = Target * 60 Else Range("Q" & Target.Row) = "" End If End If ResetApplication: Err.Clear On Error GoTo 0 Application.EnableEvents = True Set isect = Nothing End Sub
Why covert formulas to VBA, they will be more efficient as formulas
Pasting down the formulas more than 1000 cells makes the excel very untidy and once the formula is deleted by mistake then that particular cell will not work...so to avoid such cases i want every formulas to work at the backend.
So that is the reason i am trying to convert it into VBA codes..
Have you not heard of Sheet protection?
Formulas will autofill if your data is in a proper table format & your excel settings are correct
Tools -> Options ->Edit-> "extend data range formats & formulas.
Or as you are using Excel 2003 set your data as a List,
Data-> List -> create List
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks