循环遍历 Excel 中某个范围的每一行 [英] Loop through each row of a range in Excel
本文介绍了循环遍历 Excel 中某个范围的每一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是其中一件我确信有一个内置函数的东西(而且我很可能在过去被告知过),但我正在抓耳挠腮地记住它.
This is one of those things that I'm sure there's a built-in function for (and I may well have been told it in the past), but I'm scratching my head to remember it.
如何使用 Excel VBA 遍历多列范围的每一行?我一直在搜索的所有教程似乎只提到在一维范围内工作......
How do I loop through each row of a multi-column range using Excel VBA? All the tutorials I've been searching up seem only to mention working through a one-dimensional range...
推荐答案
Dim a As Range, b As Range
Set a = Selection
For Each b In a.Rows
MsgBox b.Address
Next
这篇关于循环遍历 Excel 中某个范围的每一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文