excel - 返回带有地址的单元格值
问题描述
查找功能后我有一个手机地址:
YOLO = Worksheets("Adobe Reader").Range("A1:A500").Find("YOLO").Address 'Exemple : $A$131
当我尝试显示地址范围的值时,它只显示地址:
Worksheets("Caracteristiques").Range("B1").Value = Worksheets("Adobe Reader").Range("YOLO").Value
在 B1 范围内,我有 131 美元。我怎样才能得到单元格值呢?
解决方案
How about doing it slightly differently like below:
Dim YOLO As Range
Set YOLO = Worksheets("Adobe Reader").Range("A1:A500").Find(What:="YOLO" LookAt:=xlPart)
'or LookAt:=xlWhole if the full content of the cell
If Not YOLO is Nothing Then Worksheets("Caracteristiques").Range("B1").Value = YOLO.Value
'or to get the address (YOLO.Address)
推荐阅读
- python-3.x - 在另一个条件处于活动状态时满足 Pandas 的第一个日期条件
- dart - Flutter将扩展容器中的小部件对齐到左上角和右下角?
- c# - ListView:NotifyCollectionChangedEventHandler 总是引发 ArgumentOutOfRangeException
- ios - 是否有可能在终止时不会调用 applicationWillTerminate?
- mysql - Foreach 字段中的数据将选定字段从一个数据库插入到 MySQL 中的另一个数据库
- php - 将 url 重写为干净的 url
- typescript - “-”是什么意思?TypeScript 映射类型中的语法含义?
- python - OpenCV 检测水果上的划痕
- java - 如何使用反射访问从抽象类继承的字段?
- ssrs-2008 - 如何在 SSRS 中获得第二大值