PC Review


Reply
Thread Tools Rate Thread

How Do you send results of calc to seperate rows of answers to then later create chart

 
 
greilly@zoll.com
Guest
Posts: n/a
 
      9th Apr 2007
I have a simple spreadsheet that I enter a single value, (input). It
then performs calculations and displays three results, (x), (y), and
(z). I would like to copy these results into an area of cells of
results as Row1. Then enter next input value and obtain three new
results which I want to send over to the table as Row2.

For Next Value->Calculate Results x1,y1 & z1->Record x, y and z to
table Row1, then Row2(x2, y2 and z2), Row3(x3, y3 and z3), etc...-each
row has results of the for next (input1), (input2) and (input3).

Any help would be appreciated!

~G

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      9th Apr 2007
How about this.

Create two worksheets--one the calc sheet and one the input sheet.

On the input sheet, put headers in A11
And then put the values you want in A2:A999 (or whatever).

Then after you enter all the values, you can run a macro that copies the input
value in column A and retrieves the output values and puts them in B.

You'll have to change this to use the right cells on the calculation sheet:

Option Explicit
Sub testme()

Dim InputWks As Worksheet
Dim CalcWks As Worksheet
Dim myRng As Range
Dim myCell As Range

Set InputWks = Worksheets("sheet1")
Set CalcWks = Worksheets("sheet2")

With InputWks
'headers in row 1
Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
End With

With CalcWks
For Each myCell In myRng.Cells
.Range("a1").Value = myCell.Value
Application.Calculate
myCell.Offset(0, 1).Value = .Range("b1").Value
myCell.Offset(0, 2).Value = .Range("c1").Value
myCell.Offset(0, 3).Value = .Range("d1").Value
Next myCell
End With

End Sub

I plopped the input cell into A1 and picked up from B1, C1 and D1. That can't
be a good guess!

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


(E-Mail Removed) wrote:
>
> I have a simple spreadsheet that I enter a single value, (input). It
> then performs calculations and displays three results, (x), (y), and
> (z). I would like to copy these results into an area of cells of
> results as Row1. Then enter next input value and obtain three new
> results which I want to send over to the table as Row2.
>
> For Next Value->Calculate Results x1,y1 & z1->Record x, y and z to
> table Row1, then Row2(x2, y2 and z2), Row3(x3, y3 and z3), etc...-each
> row has results of the for next (input1), (input2) and (input3).
>
> Any help would be appreciated!
>
> ~G


--

Dave Peterson
 
Reply With Quote
 
greilly@zoll.com
Guest
Posts: n/a
 
      10th Apr 2007
On Apr 9, 5:41 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> How about this.
>
> Create two worksheets--one the calc sheet and one the input sheet.
>


Does this mean one .xls file with Sheet1(calc) and Sheet2(input)? or
two seperate .xls files?

 
Reply With Quote
 
greilly@zoll.com
Guest
Posts: n/a
 
      10th Apr 2007
Thanks Dave,

I figured it out and it works like a charm.

Thanks Again!!

~George Reilly

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      10th Apr 2007
Just in case...

I'd use two worksheets in the same workbook--just because I like it that way.

But you could modify these lines:

Set InputWks = Worksheets("sheet1")
Set CalcWks = Worksheets("sheet2")

to point at any worksheet in any open workbook...

Set InputWks = workbooks("book99.xls").Worksheets("sheet1")
Set CalcWks = workbooks("book888.xls").Worksheets("sheet2")



(E-Mail Removed) wrote:
>
> On Apr 9, 5:41 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > How about this.
> >
> > Create two worksheets--one the calc sheet and one the input sheet.
> >

>
> Does this mean one .xls file with Sheet1(calc) and Sheet2(input)? or
> two seperate .xls files?


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
create chart with data from across seperate worksheets =?Utf-8?B?RGl6?= Microsoft Excel Charting 3 23rd Dec 2007 04:00 PM
Create single chart with data from seperate worksheets =?Utf-8?B?TUFUVA==?= Microsoft Excel Charting 1 10th May 2006 04:09 AM
Pivot Table for survey results with set of possible answers in PT's Rows Field? pfwebadmin@gmail.com Microsoft Excel Misc 0 16th May 2005 10:35 PM
Using the results from two seperate cells to create cell reference DarrenWood Microsoft Excel Worksheet Functions 2 14th Nov 2004 10:35 PM
Using the results from two seperate cells to create cell reference DarrenWood Microsoft Excel Worksheet Functions 0 14th Nov 2004 10:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:59 PM.