View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
acw[_2_] acw[_2_] is offline
external usenet poster
 
Posts: 100
Default How to add an argument to every cell in a range containing same type formula??

S

If I understand things properly, then in cell P5 you want the formul
=IF(ISBLANK(G5),"",OFFSET(G2,3,0)
in P
=IF(ISBLANK(G5),"",OFFSET(G3,3,0)
in P
=IF(ISBLANK(G5),"",OFFSET(G4,3,0)
in Q
=IF(ISBLANK(G1085),"",OFFSET(G1082,3,0)
in Q
=IF(ISBLANK(G1085),"",OFFSET(G1083,3,0)
in Q
=IF(ISBLANK(G1085),"",OFFSET(G1084,3,0)
in R
=IF(ISBLANK(G2165),"",OFFSET(G2162,3,0)
in R
=IF(ISBLANK(G2165),"",OFFSET(G2163,3,0)
in R
=IF(ISBLANK(G2165),"",OFFSET(G2164,3,0)

If so then enter those formulas in those cells then ru
Sub ccc(
Range("p5:r7").Cop
Range("p8").Selec
For i = 1 To 35
ActiveSheet.Past
ActiveCell.Offset(3, 0).Selec
Next

End Su

This will copy the formulas down to row 1084

Ton


Change the formulas in cells P5 -

----- foamfollower wrote: ----


Hi
Thanks for the help i received with a MsgBox question; it worke
great
Another issue i have is this
I have a block of data in cells G5:G3244. I have rearranged this on
column into three equal columns in P5:R1084 using the OFFSET functio
in formulas like this, in cells P5,P6 and P

=OFFSET(G2,3,0), =OFFSET(G3,3,0) and =OFFSET(G4,3,0

this works great for the entire column of data and is almost instan
runtime
considering my other slow macros, it was a pleasant surprise

OK, the problem is that now i'm returning zero values in cell
refernced with no data. i know all i need to do is change each OFFSE
formula to look like this: =IF(ISBLANK(G5),"",=OFFSET(G2,3,0))
i need a way to add the IfIsblank argument to every cell containin
the Offse
function, without changing the Offset formulas.
This would be a huge help, considering it took forever to make thes
formulas (as i'm sure i probably did it the hard way) first, in th
'condensed data' section, i had to copy each row of formulas (thre
colums wide each) into every third row, 1084 TIMES! then, go back an
delete the two rows in between each formula row. No Fun at All

Thanks for any help

S