查找variables和存储值

我需要find一个文本string,并将项目名称存储在文本string下方放在表单中的不同位置

示例我想查找“说明”并将其存储在其下面的所有项目中,稍后在macros中使用

在这里输入图像说明

例如,把它们放在B1中

在这里输入图像说明

这里是代码即时尝试使用,但我不知道如何存储活动范围

Sub test() 'find description Cells.Find(What:="Description", After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Selection.Offset(1, 0).Select 'Offset after find Range(Selection, Selection.End(xlDown)).Select 'Selects to end Dim DescriptionValues As Range DescriptionValues = Active.Range ActiveSheet.Range("B10") = DescriptionValues 'put stored text starting in B1 End Sub 

 Sub test() Dim rng As Range Set rng = ActiveSheet.Cells.Find(What:="Description", After:=ActiveSheet.Range("A1"), LookIn:=xlValues, _ LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not rng Is Nothing Then Set rng = ActiveSheet.Range(rng.Offset(1, 0), rng.End(xlDown)) ActiveSheet.Range("B1").Resize(rng.Rows, 1).Value = rng.Value 'put stored text starting in B1 End If End Sub