+ Reply to Thread
Results 1 to 7 of 7

need help

Hybrid View

Don Juan need help 09-05-2006, 09:34 PM
davesexcel another bleeding macro, ... 09-05-2006, 10:20 PM
Don Juan need help 09-06-2006, 03:12 PM
davesexcel ....a1 =1+1 b1 displays 2 but... 09-06-2006, 07:22 PM
Don Juan Ok, 09-06-2006, 08:00 PM
davesexcel Okay Don Juan, This will... 09-06-2006, 08:15 PM
Don Juan yes, but what goes in box... 09-06-2006, 08:42 PM
  1. #1
    Forum Contributor
    Join Date
    09-04-2006
    Posts
    117

    need help

    I was wondering how I would allow a cell to not only display a value from another cell but switch its value to represent another cell if a value were inputed into that alternate cell. for ex:

    a1 =1+1 b1 displays 2 but then i type into a2, 2+2 b1 now displays 4. b1 removed its association temporarily from a1 to a2. I would like to do this all the way down to a9, so that b1 would read whatever the last inputed number was in the a column. Also I need to set it up so that when you type a value into more than 1 of the a cells you are prompted to either add the two values a1+a2 to store in b1 or to just display a2 by itself, or whatever the last inputed number was. I want to give the user that option. Can anyone help me?

    thanks to all that spend time helping others understand this program better. It can be a little overwhelming sometimes.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Lightbulb

    another bleeding macro,

    worksheet module when there is a change in column A
    the new value is entered into B1

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 1 Then
    ActiveCell.Offset(-1, 0).Range("A1").Select

    Range("B1").Value = ActiveCell
    End If

    End Sub

  3. #3
    Forum Contributor
    Join Date
    09-04-2006
    Posts
    117

    need help

    what do I put in box b14 (the box displaying the g column) when I use the macro? b14 will change according to the last g column value entered right? So what formula goes into b14?

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    ....a1 =1+1 b1 displays 2 but then i type into a2, 2+2 b1 now displays 4. b1 removed its association temporarily from a1 to a2. I would like to do this all the way down to a9, so that b1 would read whatever the last inputed number was in the a column.....
    This code works how you asked, when you enter a value in Column A the value shows in Range B1,
    Why enter =1+1 when you could enter 2

    Alter the code Column A is Column 1 in the code change the column number as you require and the range to be displayed

  5. #5
    Forum Contributor
    Join Date
    09-04-2006
    Posts
    117

    Ok,

    I still dont know what to put into the box thats displaying the altered info. THis box I have designated b14. The column doing the changing is G3:g9. Anyone of these will display in b14. What formula do I put in b14? I typed the code exactly as you said. It has no errors but its not doing anything.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Lightbulb

    Okay Don Juan,

    This will work the way you want, when you change a value in Range G3:G9
    the value will show in B14

    Look at the code, you can change the ranges as you require

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Union(Range("$G3:$G9"), Target).Address = Range("$G3:$G9").Address Then

    Range("B14").Value = Target.Value
    End If

    End Sub

  7. #7
    Forum Contributor
    Join Date
    09-04-2006
    Posts
    117
    yes, but what goes in box b14? Any code? do I leave it empty? cuz its not displaying nothing when I do that? SHould I put something like =g3:g9 etc.? The code you gave me I understand. Whats confusing me now is what goes in b14.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1