Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Formula Question

I want to input the below formula's into a couple of ranges

Column A1 contains various information that include a "&" in the range
Range B1 through C10 I want to input

=find("&", A1) GOES INTO B1
=mid(A1, B1+1, 5) GOES INTO C1

Then this is copied down until row 10

I can't seem to get it right.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Formula Question


I'm assuming your issue is how to write it using VBA (the post titl
says that, but the post doesn't). Here's how I would do it:

Sub test()

Dim i As Integer

For i = 1 To 10
Range("B" & i).Value = "=FIND(""&"", A" & i & ")"
Range("C" & i).Value = "=mid(A" & i & ", B" & i & "+1, 5)"
Next

End Sub

One of the keys is to notice that to acutally print a double quot
rather than using it as a string container, you must double it.



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=26870

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
Newbie Formula Question - how to get formula to repeat in each subsequent row? [email protected] New Users to Excel 2 January 10th 10 05:02 PM
Formula Question Packaging Excel Discussion (Misc queries) 1 June 19th 09 05:19 PM
Formula/Sum Question Jon the Contractor Excel Worksheet Functions 2 May 4th 09 02:47 AM
Formula question Lars Excel Discussion (Misc queries) 1 March 21st 07 06:51 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM


All times are GMT +1. The time now is 08:18 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"