View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Cells within Cells formula

ok, thanks. i was just wondering if it was just a preference.

--


Gary


"Chip Pearson" wrote in message
...
Its a matter of syntax and style mostly. The Cells property and the Range
property use different syntaxes, and over time one develops a stylistic
preference. I don't think there is much of a performance difference
between the two, but I've never run any timing tests.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com






"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
chip:

is there any performance or any other reason someone would use cells(y,x)
rather than range(x,y)?

--


Gary


"Chip Pearson" wrote in message
...
In both formulas, you need to double the double quotes (for a total of
four " characters) to insert "" into the formula

Cells(x, "G").Formula = "=IF(Data!L" & x & "<"""",IF(Data!M" & _
x & "<"""",NETWORKDAYS(Data!L" & x & ",Data!M" & _
x & ",Results!$D$1:$D$3)-1,0),0)"

Cells(x, "J").Formula = "=IF(Data!I" & x & "=1,IF(Data!I" & x &
"<=6,Data!I" & x & ",""""),"""")"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"mortals" wrote in message
oups.com...
Chip,

You have the eyes of a hawk. I can't believe I missed that double
parenthesis. =/ Since you are on a roll and have been of awesome help
to me, could you help me figure out why these 2 don't work either? I've
checked for double parenthesis, quotations marks and modified it
somewhat but nothing seems to work. =/

Cells(x, "G").Formula = "=IF(Data!L" & x & "<"",IF(Data!M" & x &
"<"",NETWORKDAYS(Data!L" & x & ",Data!M" & x &
",Results!$D$1:$D$3)-1,0),0)"

Cells(x, "J").Formula = "=IF(Data!I" & x & "=1,IF(Data!I" & x &
"<=6,Data!I" & x & ",""),"")"


Thanks in advance