S
stakar
I have the following code
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
'Turn off screen
Application.ScreenUpdating = False
rng.ClearContents
[BH4] = "=" & Mid(s, 2, Len(s) - 1)
[BH4].Copy rng
rng.Copy
rng.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
-------------------
The above code concatenate checked cells and copy them till the end o
the range "BH" and then using the copy paste special, copies only th
values.
What I want is , for each value to add the quote (eg '01 or '0 o
'00010 etc) because i want to change them to strings
I found this:
Range("BH4").Value = "'" & CStr([BH4])
-----------------------------------------------
But i cant do anything more!
If its possible the code not to work cell by cell because the range o
rows is huge and it will become very slow
Thanks in advance!!
*********************************
Stathi
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
'Turn off screen
Application.ScreenUpdating = False
rng.ClearContents
[BH4] = "=" & Mid(s, 2, Len(s) - 1)
[BH4].Copy rng
rng.Copy
rng.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
-------------------
The above code concatenate checked cells and copy them till the end o
the range "BH" and then using the copy paste special, copies only th
values.
What I want is , for each value to add the quote (eg '01 or '0 o
'00010 etc) because i want to change them to strings
I found this:
Range("BH4").Value = "'" & CStr([BH4])
-----------------------------------------------
But i cant do anything more!
If its possible the code not to work cell by cell because the range o
rows is huge and it will become very slow
Thanks in advance!!
*********************************
Stathi