Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Excel VBA MID Function

Hi
why do you want to use a VBA macro. You could use the worksheet formula
=MID(A1,5,4)
in B1 and copy this down

But maybe I'm missing something in your requirements


--
Regards
Frank Kabel
Frankfurt, Germany

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel VBA MID Function

Hi Frank

I need a vba-macro to extract the 4 characters because this macro should later be intergrated in a different macro

Regard
Michhael
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
Adding a custom function to the default excel function list DonutDel Excel Programming 3 November 21st 03 03:41 PM
When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel Niek Otten Excel Programming 2 September 18th 03 03:55 AM
Excel - saving result of a function without showing the function Moshe Excel Programming 1 August 30th 03 08:41 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"