Hello everyone I use Excel 2010 with VB
Ok so I have an issue where I have to copy the bolded cells value from a column into another column AND the same value to be copied until it hits the row with the bolded cell value again and then that value takes over and is copied until another bolded value etc AND when copying the first 2 digits of a number (or characters as I think the numbers are stored as text) are to be deleted.
Can this be done?
I found this code for the copying bolded values into another column:
Sub yTekhed()
For Each cell In [A30:A2557]
If cell.Font.Bold = True Then
Debug.Print cell.Row
cell.Copy Range("I" & Range("I65536").End(xlUp).Row + 1)
End If
Next cell
End Sub
I figured out the deleting characters, there is a formula =RIGHT(A1; LEN(A1)-2)
But that is as far as I got
I still can’t copy bold over regular. So say I have:
08479
code
082222
093334
084213
08572
code
093212
012321
482123
I want the paste to look like
08479
08479
08479
08479
08572
08572
08572
08572
So paste the bold value over every regular (non bold) value until the next bold value then copy that one and then paste that value over regular values. Hope this explains it a bit better.
Any help would be greatly appreciated
This should do the trick: