读取单元格的Excel列表值[重复]

时间:2022-08-04 08:24:23

This question already has an answer here:

这个问题在这里已有答案:

I am having a Sheet X and for cell C22 i have validated the data with a list , [consider a list having values A,B,C]. I need to fetch the selected string from the list in the cell and print or Assign in another cell using Vba

我正在使用Sheet X,对于单元格C22,我已经使用列表验证了数据,[考虑具有值A,B,C的列表]。我需要从单元格中的列表中获取所选字符串,然后使用Vba在另一个单元格中打印或分配

Any help will be appreciated.

任何帮助将不胜感激。

1 个解决方案

#1


0  

For i = 22 To 30 Dim MyString As String MyString = Range(Cells(i, 3), Cells(i, 3)).value MsgBox (MyString)

对于i = 22到30 Dim MyString As String MyString = Range(Cells(i,3),Cells(i,3))。value MsgBox(MyString)

done , Thanks

做完了,谢谢

#1


0  

For i = 22 To 30 Dim MyString As String MyString = Range(Cells(i, 3), Cells(i, 3)).value MsgBox (MyString)

对于i = 22到30 Dim MyString As String MyString = Range(Cells(i,3),Cells(i,3))。value MsgBox(MyString)

done , Thanks

做完了,谢谢