Get instant live expert help on I need help with len function vba

“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

Our professional experts are available now. Your privacy is guaranteed.

Here are some problems that our users have asked and received explanations on

Hi there, could you please tell me what is wrong with this function: =IFERROR(VLOOKUP(LEFT(A4,4)&"_"&B4&"_"LEN(A4:B4),CustomerTable,2,FALSE),0). It is returning an error value and I am pretty sure it is to do with the LEN section but can't work it out
Solved by C. J. in 21 mins
Use the VBA Editor to create a new module. Type the following VBA code to create a custom depreciation function (be sure to include the blank lines after the first line and before the last line). Save and exit the VBA Editor. Function Depreciation (Value, Rate) Depreciation = Value * Rate End Function
Solved by F. C. in 11 mins
Sub ConcatWithStyles() Dim X As Long, Cell As Range, Text As String, Position As Long Range("A3").Value = Space(Evaluate("SUM(LEN(A1:F1))+COLUMNS(A1:F1)-1")) Position = 1 Application.ScreenUpdating = False For Each Cell In Range("A1:F1") With Range("A3") Characters(Position, Len(Cell.Value)).Text = Cell.Characters(1, Len(Cell.Value)).Text For X = 1 To Len(Cell.Value) With .Characters(Position + X - 1, 1).Font TintAndShade = Cell.Characters(X, 1).Font.TintAndShade FontStyle = Cell.Characters(X, 1).Font.FontStyle End With Next End With Position = Position + Len(Cell.Value) + 1 Next Application.ScreenUpdating = True End Sub
Solved by G. L. in 20 mins
Use the VBA Editor to create a new module. Function Depreciation (Value, Rate) Depreciation = Value * Rate End Function
Solved by G. S. in 30 mins
len test on cell shows more characters than appearing. After a trim. The len test still shows more characters. Hence my vlook up not working
Solved by X. E. in 22 mins