VBA code store address with areas separated with "," and I need it sometimes with ";" instead
VBA and Excel GUI aren't syncronised
CODE 1:
MsgBox Range(Sheets("Sheet1").Range("A1").Value).Cells.Co unt need
areas separated by ";"
CODE 2:
" IF Sheet2.Range("A1").Value<
Columns("V:V").SpecialCells(xlCellTypeFormulas, 1).Rows.Address
Then ..." need areas separated by ","
- why and can I do something about it?
I try to count the number of cells defined as a range in a cell in a
worksheet with MsgBox
Range(Sheets("Sheet1").Range("A1").Value).Cells.Co unt . The A1 cell
value could be like:
"$V$10:$V$25,$V$33:$V$48,$V$54:$V$71,$V$77:$V$94,$ V$100:$V$117,$V
$124:$V$140"
When I let the VBA code store an range address, I get the areas
separated with comma",". Because of the language defined in the Excel
GUI, they should be separated with semicomma ";"
I ran a "," find/replaced by ";" in the cell with the address, and
after the MsgBox Range(Sheets("Sheet1").Range("A1").Value).Cells.Co unt
worked all right.'''
Hmm, now I dont know what to do. I use the content in the cell with
other subs to compare like
" IF Sheet2.Range("A1").Value<
Columns("V:V").SpecialCells(xlCellTypeFormulas, 1).Rows.Address
Then ..." and it work OK. I guess this code won't work if I (by
code) replace the cell content from "," to ";".
What could I do?
Kind regards,
Tskogstrom
|