Displaying Values from 2 cells in another cell

G

Guest

Hi.

I have a calculation spreadsheet where the user inputs various values into
certain cells. These values are then processed through a few calculation
steps to (obviously) come up with the answer!

I want to be able to show the calculation steps with the entered values next
to the cell that performs the actual calculation. Can this be done?

E.g.

Cell A1 = Enter 1st Number; Cell A2 = 12345
Cell B1 = Enter 2nd Number; Cell B2 = 67890

Cell A30 = 12345 x 67890 =; Cell B30 = A2*B2

Is this possible? I have tried using code but cannot seem to get it to work
(I get a #NAME error in Cell A30)

Thanks, Steve.
 
G

Guest

Steve,

I assume that what you have in A1, B1 and C30 are text descriptions of what
is going on. The code belwo will perform the calculation.

Sub multiply()
Worksheets("Sheet1").Cells(30, 2).Value = _
Worksheets("Sheet1").Cells(1, 2).Value * _
Worksheets("Sheet1").Cells(1, 2).Value
End Sub

Mike
 
G

Guest

OOPS should be

Sub multiply()
Worksheets("Sheet6").Cells(30, 2).Value = _
Worksheets("Sheet6").Cells(1, 2).Value * _
Worksheets("Sheet6").Cells(2, 2).Value
End Sub
 
N

nottom04

Maybe, I don't understand what you are trying to accomplish, but would

A30 = A2 & " * " & B2 & " ="

do what you want?

-Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top