Hi!
I've got a big stack of order receipts in a single column, and I'm trying to create a macro to sort it out and clean it up. I recorded a macro that for the most parts works fine, but for the very beginning where I want to search for a specific value and select all cells containing that value. When I record that part of the macro, the code merely reads:
There's nothing about a search phrase and selecting all results.
This is what the rest of it looks like:
Seems that I'm at the moment unable to add screen shots of the problem, but to clarify some here's an example:
Whoa it looks ugly. Well anyway there's thousands of rows of information like this in one single column, and I'm trying to find and select every cell containing "Tuotenumero", then doing the magic that actually works well already, then doing the same for other types of cells.
Any chance of it working?
I've got a big stack of order receipts in a single column, and I'm trying to create a macro to sort it out and clean it up. I recorded a macro that for the most parts works fine, but for the very beginning where I want to search for a specific value and select all cells containing that value. When I record that part of the macro, the code merely reads:
Sub valintatesti()
'
' valintatesti Makro
' etsii ja valitsee
'
'
Columns("A:A").Select
End Sub
There's nothing about a search phrase and selecting all results.
This is what the rest of it looks like:
Sub Makro1()
'
' Makro1 Makro
'
'
*Here would be the code for finding and selecting*
Selection.Copy
Sheets("testilehti").Select
Range("E12").Select
ActiveSheet.Paste
Selection.Replace What:="Tuotenumero: ", Replacement:="", LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0"
End Sub
Seems that I'm at the moment unable to add screen shots of the problem, but to clarify some here's an example:
1. Tuotenumero:8 88072395145 Nimeke: Traveling Wilburys Vol.3 Aineistotyyppi: MUSIIKKIÄÄNITE (CD) Allfons ID: 4402004 1 kpl a`13,31€ (Listahinta a`16,13€) Kokonaissumma: 13,31€ 2. Tuotenumero: 0888072395138 Nimeke: Traveling Wilburys Vol.1 Aineistotyyppi: MUSIIKKIÄÄNITE (CD) Allfons ID: 4402007 1 kpl a`13,31€ (Listahinta a`16,13€) Kokonaissumma: 13,31€ 3. Tuotenumero: 4029759113461 Tekijä: Hubbard, Freddie Nimeke: Hub of Hubbard Aineistotyyppi: MUSIIKKIÄÄNITE (CD) Allfons ID: 4403689 1 kpl a`9,90€ (Listahinta a`12,00€) Kokonaissumma: 9,90€ 4. Tuotenumero: 4029759115144 Nimeke: Destiny Aineistotyyppi: MUSIIKKIÄÄNITE (CD) Allfons ID: 4403699 1 kpl a`13,39€ (Listahinta a`16,23€) Kokonaissumma: 13,39€
<tbody>
</tbody>
Whoa it looks ugly. Well anyway there's thousands of rows of information like this in one single column, and I'm trying to find and select every cell containing "Tuotenumero", then doing the magic that actually works well already, then doing the same for other types of cells.
Any chance of it working?