Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave Thank you
It does exactly what I wanted. What is the best way to check for illegal values? ie if either or both of the two summed cells have a value of 0, I would want to skip to the next icol CR "Dave Peterson" wrote in message ... Dim iCol as long dim FirstCol as long dim LastCol as long with worksheets("Somesheetnamehere") firstcol = .range("d1").column lastcol = .range("s1").column for icol = firstcol to lastcol 'no check for illegal values! if (.cells(3,icol).value + .cells(5,icol).value) _ .cells(1,icol).value then 'do something else 'do nothing end if next icol end with Untested, uncompiled. Watch for typos. 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
loop variable range | Excel Programming | |||
loop variable range | Excel Programming | |||
loop variable range | Excel Programming | |||
Referencing variable Range in a loop | Excel Programming | |||
How to reference variable range in a loop | Excel Programming |