New problem, hopefully new solution.
Gonna try to explain this: I one colum(A1) where i specify the hight of one certain object. In the colum(A2) below I want to write another hight AND get that number to be A1-A2. The problem here is that i want to write one hight AND get the answer from the function in the same colum, possible?
Thanks in advance
Hi,Originally Posted by chojje
If you rightmouse the sheet tab, select View Code, and pasteinto there it should do that.Code:Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$2" Then Application.EnableEvents = False Cells(2, 1).Value = Cells(1, 1).Value - Cells(2, 1).Value End If Application.EnableEvents = True End Sub
hth
---
Si fractum non sit, noli id reficere.
Thanks for your help man but i dont think we are working in the same prog here :P I´m just working in standard Excel and cant write in any "Private Sub" etcOriginally Posted by Bryan Hessey
![]()
Excel.exe operates on Workbooks, which have Worksheets, which have Columns, Rows, and Cells as the intersection between Column and Row.Originally Posted by chojje
note that A1 and A2 are Cells, not columns.
At the bottom of the sheet is a small tab with the sheet name, probably Sheet1
rightmouse in that tab and follow my first post.
---
Si fractum non sit, noli id reficere.
haha ow nice, found it, thanks manOriginally Posted by Bryan Hessey
Just one more question: I´m not using A1 and A2, instead the real cells is E6-E7, how should i then change the thing u sent me? ( Never worked with this before, so please flame me )
Last edited by chojje; 06-25-2007 at 06:22 AM.
cells E6 & E7 would beOriginally Posted by chojje
Cells(7, 5).Value = Cells(6, 5).Value - Cells(7, 5).Value
---
Si fractum non sit, noli id reficere.
Worked, thanks manOriginally Posted by Bryan Hessey
But where does this 5 comes from, so i dont have to ask more in the future?
Last edited by chojje; 06-25-2007 at 07:44 AM.
did you change the test toOriginally Posted by chojje
If Target.Address = "$E$7" Then
or are you still testing $A$2 ?
---
Si fractum non sit, noli id reficere.
5 = 5th columnOriginally Posted by Bryan Hessey
---
Si fractum non sit, noli id reficere.
Ye i did, thanksOriginally Posted by Bryan Hessey
Alright i get the picture.
How do i do if i want a similair "ekvation" but just with different Cells? Cuz i did put/copied another one just below it and filled with other cells and got "worksheet_Change" error :/
Last edited by chojje; 06-25-2007 at 08:52 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks