LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default concatenating line decided not to work

I have copied some code from one section of code to another. For the
life of me, I can not figure out why it is not working.
I can get as far as the lines that have the rc[-1]/reviewtotalCA
formulas - and it works fine. baselinetotalCA and reviewtotalCA are
names of cells elsewhere. However, I can not use the intermediate
window to obtain their values.
Also, the following formula, jformula, works elsewhere, but here, it
does not. Elsewhere, I use "named" cells as references, and it works
fine. But it is not here. I have tried giving variable names to the
values in the named cells and using the variable names in jformula -
but can't get that to work either.


Please shed some light on why this is not working.


Set causetable = Range("aa2").CurrentRegion
fields = causetable.Rows.Count


Set causetable2 = causetable.Offset(fields, 1).Resize(1, 4)


causetable2.Select
Selection.Formula = "=sum(" & causetable.Columns(2).Address(Â*True,
False) & ")"
ActiveCell.Name = "baselinetotalCA"
causetable2.Range("c1").Name = "reviewtotalCA"
'reviewtotalCA = .Value
Range("ac2:ac" & fields + 1).FormulaR1C1 = "=rc[-1]/baselinetotalCA"
Range("aE2:aE" & fields + 1).FormulaR1C1 = "=rc[-1]/reviewtotalCA"


'the above lines give me expected results


jFormula = "=concatenate(""Baseline: "",TEXT(begbase3,""m/d/yy"")" & _
","" through "",TEXT(endbase3,""m/d/yy"")" & _
", "" (Total "",text(baselinetotalCA,""0"")Â*,"" events; Yearly avg
"","")"")"
Range("ac1").Formula = jFormula



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
char(10) does not work to form a new line in my formula Sandy Excel Worksheet Functions 2 April 3rd 23 02:12 PM
How do I get a line break to always work? AFD at FONO[_2_] Excel Discussion (Misc queries) 2 May 15th 08 12:29 AM
How do i get Ecel on line? why does IE not work? ameron Excel Discussion (Misc queries) 0 January 26th 06 08:52 PM
How do I start new line when concatenating text strings in excel? Max Excel Discussion (Misc queries) 2 January 26th 06 05:48 PM
How do I insert a line into a footer? Enter doesn't work. vungher Excel Discussion (Misc queries) 1 August 22nd 05 10:18 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"