Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is what I'm attempting to do...
Check a large range of cells for the text "#" Once I find a cell that has the "#" text, I need to take the 4 characters right of the "#" text and place it into a different column Thanks -- Helping Is always a good thing |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simple solution to get you started; no code.
=MID(A7,FIND("#",A7)+1,4) I'll try to come up with a solution that loops through the data later, when I have more time. Regards, Ryan--- -- RyGuy "QuietMan" wrote: Here is what I'm attempting to do... Check a large range of cells for the text "#" Once I find a cell that has the "#" text, I need to take the 4 characters right of the "#" text and place it into a different column Thanks -- Helping Is always a good thing |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks,
I have to do 3 checks also when looping through the data what do you think is the best way to lop through (fastest) -- Helping Is always a good thing "ryguy7272" wrote: Simple solution to get you started; no code. =MID(A7,FIND("#",A7)+1,4) I'll try to come up with a solution that loops through the data later, when I have more time. Regards, Ryan--- -- RyGuy "QuietMan" wrote: Here is what I'm attempting to do... Check a large range of cells for the text "#" Once I find a cell that has the "#" text, I need to take the 4 characters right of the "#" text and place it into a different column Thanks -- Helping Is always a good thing |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Finally done with Fluid Dynamics so I can revisit. Try this:
Sub Convert() Range("A1").Select For X = 1 To 1 Dim redRng As Range Set redRng = Range("A1", Range("A100").End(xlUp)) For Each cell In redRng If cell.Value < "" Then ActiveCell.Offset(0, 2).Select ActiveCell.FormulaR1C1 = "=MID(RC[-2],FIND(""#"",RC[-2])+1,4)" ActiveCell.Offset(1, -2).Select End If Next cell Next X End Sub Regards, Ryan--- -- RyGuy "QuietMan" wrote: Thanks, I have to do 3 checks also when looping through the data what do you think is the best way to lop through (fastest) -- Helping Is always a good thing "ryguy7272" wrote: Simple solution to get you started; no code. =MID(A7,FIND("#",A7)+1,4) I'll try to come up with a solution that loops through the data later, when I have more time. Regards, Ryan--- -- RyGuy "QuietMan" wrote: Here is what I'm attempting to do... Check a large range of cells for the text "#" Once I find a cell that has the "#" text, I need to take the 4 characters right of the "#" text and place it into a different column Thanks -- Helping Is always a good thing |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the Help...
I came up with this code Cells(20000, 14).Select Selection.End(xlUp).Select EndRow = ActiveCell.Row For X = 1 To EndRow Eval = Left(Cells(X, 1), 10) If Eval < " CURRENCY" Then GoTo No_Find Entity = Mid(Cells(X, 1), Application.Find("#", Cells(X, 1)) + 1, 4) Do Until Cells(X, 1) = "AVAILABLE ROOMS" X = X + 1 Loop Range("A" & X, Range("A" & X).End(xlDown)).Offset(0, 15) = Entity Cells(X, 1).Select Selection.End(xlDown).Select X = ActiveCell.Row No_Find: Next X Works great but it enters a value for the entity example: Entity = "0012" but it enters 12 in the cell any Ideas? -- Helping Is always a good thing "ryguy7272" wrote: Finally done with Fluid Dynamics so I can revisit. Try this: Sub Convert() Range("A1").Select For X = 1 To 1 Dim redRng As Range Set redRng = Range("A1", Range("A100").End(xlUp)) For Each cell In redRng If cell.Value < "" Then ActiveCell.Offset(0, 2).Select ActiveCell.FormulaR1C1 = "=MID(RC[-2],FIND(""#"",RC[-2])+1,4)" ActiveCell.Offset(1, -2).Select End If Next cell Next X End Sub Regards, Ryan--- -- RyGuy "QuietMan" wrote: Thanks, I have to do 3 checks also when looping through the data what do you think is the best way to lop through (fastest) -- Helping Is always a good thing "ryguy7272" wrote: Simple solution to get you started; no code. =MID(A7,FIND("#",A7)+1,4) I'll try to come up with a solution that loops through the data later, when I have more time. Regards, Ryan--- -- RyGuy "QuietMan" wrote: Here is what I'm attempting to do... Check a large range of cells for the text "#" Once I find a cell that has the "#" text, I need to take the 4 characters right of the "#" text and place it into a different column Thanks -- Helping Is always a good thing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding specific text in ranges | Excel Discussion (Misc queries) | |||
Finding the text written in specific color | Excel Programming | |||
Finding specific text in string - Part II | Excel Worksheet Functions | |||
Finding specific text in a string | Excel Worksheet Functions | |||
Finding Specific Text in a Text String | Excel Worksheet Functions |