Link to home
Start Free TrialLog in
Avatar of Pau Lo
Pau Lo

asked on

format calculator in same cell

Is there anyway in excel, if a user enters a value in a cell, i.e. 4, it automatically performs a calculation to change that value. For example in A1, if a user types 4, in cell B1 I have the value 4 pre-populated, so I want A1 to show the output of the formula

A1*B1,

so if the user types 4, it will return 16. I cant see anyway to do this via formatting.
Avatar of Rgonzo1971
Rgonzo1971

Hi,

Why don't you want the result in another cell?

Regards
Hello,

I don't think so that the same can be done.

So Rethink on it....
Put this code in the worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
    Target.Value = Target.Value * Target.Offset(, 1).Value
End Sub

Open in new window

Hi,

Of course it is possible to make it but it is bad design to have input and result at the same place
Say your are tipping 12 answer a call and do not remember what you tipped you won't know whether 12 is the input or the result.

Regards
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes it would. Although personally I wouldn't recommend it without thoroughly examining the workflow.