Вопрос

Essentially what I need to do is Type a number into cell A1 and have that reflect cell B and C. Then type into B and have that reflect A and C. And finally type into C and have that reflect A and B.

(Obviously They can't all depend on each other automatically, so they have to send the info to the other two cells only after completing a manual entry of a value in either of the 3 cells.)

Case:

A1=1 , B2=60 , C1=3600

Respectively - Hours, Minutes, Seconds.

What I need is to type 5400 into C1 and end up with 90 in B1, and 1.5 in A1. After that if type 2 in A1, end up with 120 in B1 and 7200 in C1. Etc.

Thx in advance. (don't know if it need VBA)

Btw does anybody know of a spreadsheet web service that doesn't have a downloads, annoying registrations etc. Would have been alot faster if i linked something back here, that people don't need to login and register to see as an example...

Это было полезно?

Решение

Here's the solution for future reference. Kudos to ragulduy for it.

Private Sub worksheet_change(ByVal target As Range)
If Not Intersect(target, Range("A1:C1")) Is Nothing Then
    Application.EnableEvents = False
    If target.Address = "$A$1" Then
        Range("B1") = Range("A1") * 60
        Range("C1") = Range("A1") * 3600
    ElseIf target.Address = "$B$1" Then
        Range("A1") = Range("B1") / 60
        Range("C1") = Range("B1") * 60
    ElseIf target.Address = "$C$1" Then
        Range("A1") = Range("C1") / 3600
        Range("B1") = Range("C1") / 60
    End If
    Application.EnableEvents = True
End If
End Sub

Tags: Co-dependent cells, Co dependent cells, Cell cross reference, Cross-reference cell, Multi Dependent cell

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top