Hello,
If I have numbers in a cell "1294392393", I want the 4th from the right side (the thousand number), I want a "color/border" on the whole columns.
For instance:
"1294392393" = 12943[9]393 ----- the nr "9" shall make a color blue on the whole column.
In a row below the "12943" = 1[2]943 ----- The nr "2" shall make a color orange on the whole column.
"1000" = [1]000 ---- The nr "1" shall have the color Red on the whole column.
And last example:
"14751565152512" = 1475156515[2]512 ---- the nr 2 shall have orange on the whole column.
I found this code in this forum from someone else topic:
This takes ANY number, I want specific number, and instead of c= "TGMS" I want to make for each nr a color.
So every number:
1 = blue
2 = orange
3 = etc etc. until 9.
How should I code this? I can't figure out because I want specific number, not any... I want to If IsNumeric(Right(c, 4, 1) = 1) Then for nr 1. but this doesn't work...
I know coding on PHP, so excel coding is a bit different where I need to relearn some.
If I have numbers in a cell "1294392393", I want the 4th from the right side (the thousand number), I want a "color/border" on the whole columns.
For instance:
"1294392393" = 12943[9]393 ----- the nr "9" shall make a color blue on the whole column.
In a row below the "12943" = 1[2]943 ----- The nr "2" shall make a color orange on the whole column.
"1000" = [1]000 ---- The nr "1" shall have the color Red on the whole column.
And last example:
"14751565152512" = 1475156515[2]512 ---- the nr 2 shall have orange on the whole column.
I found this code in this forum from someone else topic:
Code:
Sub Controll_datas()
On Error Resume Next
Dim c As Range
For Each c In Range("C2", Range("C" & Rows.Count).End(xlUp))
If IsNumeric(Mid(c, 3, 1)) Then
c = "TGMS"
End If
Next c
End Sub
This takes ANY number, I want specific number, and instead of c= "TGMS" I want to make for each nr a color.
So every number:
1 = blue
2 = orange
3 = etc etc. until 9.
How should I code this? I can't figure out because I want specific number, not any... I want to If IsNumeric(Right(c, 4, 1) = 1) Then for nr 1. but this doesn't work...
I know coding on PHP, so excel coding is a bit different where I need to relearn some.