0

基本上我想做的是:

Select Case test_expression
   Case condition_1
      result_1   
   Case condition_n
      result_n
End Select

我需要它condition_nresult_n从电子表格中读取,其中condition_1result_1在列 A 和 B 中。然后有时会将行添加到电子表格中!

感谢您的任何建议!

4

1 回答 1

0

不知道你想完成什么,但这里是一个尝试

Select Case test_expression 
    Case Sheets(1).Range("A1").Value 
        Dim s as String
        resultText = Sheets(1).Range("B1").Value

        'Now do something with resultText

    Case condition_n 
         result_n 
End Select
于 2012-11-07T10:57:28.050 回答