Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default building a formula

Hi all
I have been aske to make a spreadsheet that will build a set of formulas
based on the number of sheets being used. The sheets are name shA, shB etc
and can change. The formaula that I need is on a summary sheet and is as
follows:
fname = "=SUMIF(" & tmpName & "!E8:E107," & "=LO" & ",HT_end!D8:D107)"
where tmpName is the name of each spreadsheet, LO is the criteria for the
search.
The result is :
=SUMIF(HT_end!'E8':'E107',LO,HT_end!'D8':'D107') I was after
=SUMIF(HT_end!E8:E107,"LO",HT_end!D8:D107)
Any ideas or better method appreciated
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default building a formula

Did you use .formula or .formulaR1C1?

Just curious why you have tmpName in one portion and HT_End in the other. Did
you mean that?

Murray wrote:

Hi all
I have been aske to make a spreadsheet that will build a set of formulas
based on the number of sheets being used. The sheets are name shA, shB etc
and can change. The formaula that I need is on a summary sheet and is as
follows:
fname = "=SUMIF(" & tmpName & "!E8:E107," & "=LO" & ",HT_end!D8:D107)"
where tmpName is the name of each spreadsheet, LO is the criteria for the
search.
The result is :
=SUMIF(HT_end!'E8':'E107',LO,HT_end!'D8':'D107') I was after
=SUMIF(HT_end!E8:E107,"LO",HT_end!D8:D107)
Any ideas or better method appreciated
Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default building a formula

Dave, was using .formulaR1C1.
The tmpName is the variable sheet name and was HT_End in this example.

Thanks

"Dave Peterson" wrote:

Did you use .formula or .formulaR1C1?

Just curious why you have tmpName in one portion and HT_End in the other. Did
you mean that?

Murray wrote:

Hi all
I have been aske to make a spreadsheet that will build a set of formulas
based on the number of sheets being used. The sheets are name shA, shB etc
and can change. The formaula that I need is on a summary sheet and is as
follows:
fname = "=SUMIF(" & tmpName & "!E8:E107," & "=LO" & ",HT_end!D8:D107)"
where tmpName is the name of each spreadsheet, LO is the criteria for the
search.
The result is :
=SUMIF(HT_end!'E8':'E107',LO,HT_end!'D8':'D107') I was after
=SUMIF(HT_end!E8:E107,"LO",HT_end!D8:D107)
Any ideas or better method appreciated
Thanks


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default building a formula

Your formula string is written in A1 reference style. So use .formula instead
of .FormulaR1C1.

(Sorry for not making that more clear the first time.)

If that doesn't work, copy your code snippet from the VBE and paste into your
response.

Murray wrote:

Dave, was using .formulaR1C1.
The tmpName is the variable sheet name and was HT_End in this example.

Thanks

"Dave Peterson" wrote:

Did you use .formula or .formulaR1C1?

Just curious why you have tmpName in one portion and HT_End in the other. Did
you mean that?

Murray wrote:

Hi all
I have been aske to make a spreadsheet that will build a set of formulas
based on the number of sheets being used. The sheets are name shA, shB etc
and can change. The formaula that I need is on a summary sheet and is as
follows:
fname = "=SUMIF(" & tmpName & "!E8:E107," & "=LO" & ",HT_end!D8:D107)"
where tmpName is the name of each spreadsheet, LO is the criteria for the
search.
The result is :
=SUMIF(HT_end!'E8':'E107',LO,HT_end!'D8':'D107') I was after
=SUMIF(HT_end!E8:E107,"LO",HT_end!D8:D107)
Any ideas or better method appreciated
Thanks


--

Dave Peterson


--

Dave Peterson
Reply
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
VBA formula building pm[_2_] Excel Programming 14 March 7th 06 03:10 AM
Pulling my hair out, need some help building a formula Jackanorry Excel Worksheet Functions 2 June 23rd 05 04:05 PM
When building formula in excel, it would be very useful to have t. [email protected] Excel Programming 1 October 20th 04 12:07 PM
When building formula in excel, it would be very useful to have t. [email protected] Excel Programming 0 October 20th 04 11:09 AM
Building a Named Range in a formula with VBA John[_80_] Excel Programming 1 July 7th 04 03:06 PM


All times are GMT +1. The time now is 10:34 AM.

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

About Us

"It's about Microsoft Excel"