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

I am working on an estimating program in which I calculate
the price of an object with a spread sheet. I currently
post the result of that calculation to a summary spread
sheet and then total all the calculations to come up with
the final price of the object. My problem is that not all
the itens that are linked to the summary spread sheet
should be posted to the summary spread sheet. Only those
results that have a value should be posted. I do not want
to post results that have a zero as ther result posted.
Furthermore I would like to not have lines that are empty
in the summary spread sheet. Is there a way to accomplish
this task using excell or VBA formulas or macros? A second
problem is that I would like to link text about the
results in the same fashion. Way over my head! Bob
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Linking worksheets

Hard to tell without details but something like this should work
sub sumemup()
if sheets("sheet3").range("a2")0 then
sheets("summary").range("a2")=sheets("sheet3").ran ge("a2")
if sheets("sheet3").range("a3")0 then
sheets("summary").range("a3")=sheets("sheet3").ran ge("a3")
end sub

"Robert R Johnson" wrote in message
...
I am working on an estimating program in which I calculate
the price of an object with a spread sheet. I currently
post the result of that calculation to a summary spread
sheet and then total all the calculations to come up with
the final price of the object. My problem is that not all
the itens that are linked to the summary spread sheet
should be posted to the summary spread sheet. Only those
results that have a value should be posted. I do not want
to post results that have a zero as ther result posted.
Furthermore I would like to not have lines that are empty
in the summary spread sheet. Is there a way to accomplish
this task using excell or VBA formulas or macros? A second
problem is that I would like to link text about the
results in the same fashion. Way over my head! Bob



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Linking worksheets

Robert,

The easiest link is a formula:
=Sheet1!A1
(change 'Sheet1' and 'A1' to suit)
This links numbers and text.

You can change this to:
=If(Sheet1!A1=0,"",Sheet1!A1)
to leave cells blank if there is nothing.

You can also combine text from different cells:
=Sheet1!A1&Sheet1!B1
or to add a space
=Sheet1!A1&" "&Sheet1!B1

Hope this is what you are looking for.

You can also build this into code.
Sheets("Sheet2").Range("A1") = Sheets("Sheet1").Range("A1")

And you can use an If statement in code:
If Len(Sheets("Sheet1").Range("A1")) 0 then
Sheets("Sheet2").Range("A1") = Sheets("Sheet1").Range("A1")
End If

AND you can build a loop to do this in a range of cells...

Post back if you need further help...
--
sb
"Robert R Johnson" wrote in message
...
I am working on an estimating program in which I calculate
the price of an object with a spread sheet. I currently
post the result of that calculation to a summary spread
sheet and then total all the calculations to come up with
the final price of the object. My problem is that not all
the itens that are linked to the summary spread sheet
should be posted to the summary spread sheet. Only those
results that have a value should be posted. I do not want
to post results that have a zero as ther result posted.
Furthermore I would like to not have lines that are empty
in the summary spread sheet. Is there a way to accomplish
this task using excell or VBA formulas or macros? A second
problem is that I would like to link text about the
results in the same fashion. Way over my head! Bob



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
Linking 2 worksheets Paul Excel Discussion (Misc queries) 2 June 1st 08 03:16 PM
Linking worksheets Shaun Excel Discussion (Misc queries) 1 July 20th 07 12:31 PM
Linking worksheets Tom Brown Excel Discussion (Misc queries) 5 July 13th 07 04:51 AM
Linking worksheets Smith Links and Linking in Excel 1 March 18th 05 07:17 AM
Linking worksheets Smith Links and Linking in Excel 0 March 17th 05 08:24 PM


All times are GMT +1. The time now is 10:24 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"