Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Newbie Formula Question - how to get formula to repeat in each subsequent row? | New Users to Excel | |||
Formula Question | Excel Discussion (Misc queries) | |||
Formula/Sum Question | Excel Worksheet Functions | |||
Formula question | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) |