ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loop down, then across (https://www.excelbanter.com/excel-programming/377153-loop-down-then-across.html)

Bettergains

Loop down, then across
 
Hello:

A not so difficult question. I want to loop down rows, query the cell, then
paste in a value (text from a fixed cell), and when this is done, start over
in the next column. Something like this:

Range = R4c1: R4:c25
Loop down C1
If cell.text = "x" Then
cell.value = $R3Cy
Else
Next Row

Next Column

Thanks, G~




RB Smissaert

Loop down, then across
 
I don't quit get the range you want to work on, but I think you want
something like this:

Dim c As Range

For Each c In Range(Cells(4, 1), Cells(10, 25))
If c.Value = "x" Then
c.Value = Cells(3, c.Column)
End If
Next

RBS


"Bettergains" wrote in message
...
Hello:

A not so difficult question. I want to loop down rows, query the cell,
then
paste in a value (text from a fixed cell), and when this is done, start
over
in the next column. Something like this:

Range = R4c1: R4:c25
Loop down C1
If cell.text = "x" Then
cell.value = $R3Cy
Else
Next Row

Next Column

Thanks, G~






All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com