Hi
I'm having a problem getting a macro to find numbers with a spreadsheet. this is due to 2 different number formats. I can get it to find for example 4208-118, however not 61751.
This is the code which I think is the problem.
For index5 = 2 To index3
If Sheets("MARKFLOORPLAN").Cells(index5, 1).Value <> "" Then
Sheets("MARKFLOORPLAN").Cells(index5, 2).FormulaR1C1 = "=LEFT(RC[-1],4)"
Sheets("MARKFLOORPLAN").Cells(index5, 3).FormulaR1C1 = "=RIGHT(RC[-2],3)"
Sheets("MARKFLOORPLAN").Cells(index5, 4).Value = Sheets("MARKFLOORPLAN").Cells(index5, 2) + "-" + Sheets("MARKFLOORPLAN").Cells(index5, 3)
kleur = Sheets("MARKFLOORPLAN").Cells(index5, 1).Interior.ColorIndex
Sheets("MARKFLOORPLAN").Cells(index5, 4).Select
With ActiveCells
ActiveCell.Interior.ColorIndex = kleur
End With
End If
Can anybody please help me?
I'm having a problem getting a macro to find numbers with a spreadsheet. this is due to 2 different number formats. I can get it to find for example 4208-118, however not 61751.
This is the code which I think is the problem.
For index5 = 2 To index3
If Sheets("MARKFLOORPLAN").Cells(index5, 1).Value <> "" Then
Sheets("MARKFLOORPLAN").Cells(index5, 2).FormulaR1C1 = "=LEFT(RC[-1],4)"
Sheets("MARKFLOORPLAN").Cells(index5, 3).FormulaR1C1 = "=RIGHT(RC[-2],3)"
Sheets("MARKFLOORPLAN").Cells(index5, 4).Value = Sheets("MARKFLOORPLAN").Cells(index5, 2) + "-" + Sheets("MARKFLOORPLAN").Cells(index5, 3)
kleur = Sheets("MARKFLOORPLAN").Cells(index5, 1).Interior.ColorIndex
Sheets("MARKFLOORPLAN").Cells(index5, 4).Select
With ActiveCells
ActiveCell.Interior.ColorIndex = kleur
End With
End If
Can anybody please help me?