Forum Discussion
Excel
Sep 01, 2022Iron Contributor
Related to VBA code
Hello everyone, I want to calculate LEN function of Column K with the help of VBA code. I have written the code for the function now i want result to displayed in n column can you help me to write...
- Sep 01, 2022
Try this:
Sub Test() Dim m As Long m = Range("K" & Rows.Count).End(xlUp).Row With Range("N2:N" & m) .Formula = "=LEN(K2)-LEN(SUBSTITUTE(K2,"","",""""))" .Value = .Value End With End Sub
HansVogelaar
Sep 01, 2022MVP
Try this:
Sub Test()
Dim m As Long
m = Range("K" & Rows.Count).End(xlUp).Row
With Range("N2:N" & m)
.Formula = "=LEN(K2)-LEN(SUBSTITUTE(K2,"","",""""))"
.Value = .Value
End With
End Sub- ExcelSep 02, 2022Iron Contributor
Hello Sir,
How to Autosum of JAN, FEB, MAR and TOTAL EXPENSES of every sheetwith the help of VBA code ?
Please help...
Here is a attached file...
- HansVogelaarSep 02, 2022MVP
You have asked very similar questions when you were active as Zan or Zain.
Look through your older discussions, you'll find the code you need.
- ExcelSep 27, 2022Iron Contributor
Hello sir,
How are you ?
I have written code for vlookup function and it works.
But one problem is that for lookup_value and Column index number is always manually change.
what should i add code to make it more dynamic and get correct result ?
Please help..?
Here is a attached file..