S
stakar
I have the following text formatted numeric data in column A
A
------
00
010100
0010
1025
0000
1025
010
020
05
000
510
140510
0010
Here's the code for the above
code:
--------------------------------------------------------------------------------
Set rng = Range([BH4], [A65536].End(xlUp)(1, 60))
Set CheckboxRange = [A1:BG1].SpecialCells(xlCellTypeConstants, 2)
For Each ThisCell In CheckboxRange
s = s & "&" & ThisCell(4).Address(False, False)
Next ThisCell
Application.ScreenUpdating = False
rng.ClearContents
[BH4] = "=" & Mid(s, 2, Len(s) - 1)
[BH4].Copy rng
rng.Copy
rng.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
--------------------------------------------------------------------------------
I need to add a vb code to the above that :
When a type e.g. an "X" in the cell A1 it will NOT write the column's
results but it will
format column's A data to numbers and then it will write a column
using the condition:
If the cell in column A is "> 0" then the result will be 1 else it wil
be 0.
This is what i ll get
A B
-------------
00 0
010100 1
0010 1
1025 1
0000 0
1025 1
010 1
020 1
05 1
000 0
510 1
140510 1
0010 1
--------------------------------------------------------------------------------
Otherwise when the cell is null (without the "X") the result will com
from the code
i wrote and i ll get column's A result
Thanks in advance
****************************
Stathis
Patras Greec
A
------
00
010100
0010
1025
0000
1025
010
020
05
000
510
140510
0010
Here's the code for the above
code:
--------------------------------------------------------------------------------
Set rng = Range([BH4], [A65536].End(xlUp)(1, 60))
Set CheckboxRange = [A1:BG1].SpecialCells(xlCellTypeConstants, 2)
For Each ThisCell In CheckboxRange
s = s & "&" & ThisCell(4).Address(False, False)
Next ThisCell
Application.ScreenUpdating = False
rng.ClearContents
[BH4] = "=" & Mid(s, 2, Len(s) - 1)
[BH4].Copy rng
rng.Copy
rng.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
--------------------------------------------------------------------------------
I need to add a vb code to the above that :
When a type e.g. an "X" in the cell A1 it will NOT write the column's
results but it will
format column's A data to numbers and then it will write a column
using the condition:
If the cell in column A is "> 0" then the result will be 1 else it wil
be 0.
This is what i ll get
A B
-------------
00 0
010100 1
0010 1
1025 1
0000 0
1025 1
010 1
020 1
05 1
000 0
510 1
140510 1
0010 1
--------------------------------------------------------------------------------
Otherwise when the cell is null (without the "X") the result will com
from the code
i wrote and i ll get column's A result
Thanks in advance
****************************
Stathis
Patras Greec