ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   loop variable range (https://www.excelbanter.com/excel-programming/433890-re-loop-variable-range.html)

Dave Peterson

loop variable range
 
I need to sum D3 and D5...

sounds like it's not D3 through D5.

Jim Thomlinson wrote:

That adds cells in rows 3 and 5, not 3, 4 and 5.
--
HTH...

Jim Thomlinson

"Patrick Molloy" wrote:

for cl = 5 to 20 'whatever S is

if ( cells(3,cl) + cells(5,cl) ) cells(1,cl) then
'do something
next


"CR" wrote:

I have a Range with values D1:S5

I need to sum D3 and D5 and if it is D1 value then
Do something

Then loop through E to S, doing the same thing

Any help would be appreciated

Thanks
CR




--

Dave Peterson


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

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