Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Public Sub MidA1ToA4() Dim cell As Range For Each cell In Range("A1:A4") With cell .Value = Mid(.Text, 5, 4) End With Next cell End Sub In article , "Michael E." wrote: Hi, I do have strings of characters in a column of cells. Each cell has exact the same number of characters (11). Like this: Cells from A1 to A4 tva/1,23/bn bnc/2,24/vb gzc/3,12/jb hzf/1,56/hj I only need the characters at position 5,6,7,8: 1,23 2,24 3,12 1,56 I would like to do the task with a vba-macro that selects cells A1-A4 and then shows only the 4 charakters. I think the vba MID-Function Mid (string, start, length) would be the right tool. But I don´t know how to write the makro. Can anyone help? Thanks a lot Michael |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
Adding a custom function to the default excel function list | Excel Programming | |||
When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel | Excel Programming | |||
Excel - saving result of a function without showing the function | Excel Programming |