Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: using data in highlighted cells

  1. #1
    New Member
    Join Date
    Jan 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK this is what I am trying to do..

    Have the user click on a cell,

    Click on a macro button that will bring
    up a simple promt box asking for a value.

    Take the number from the input box and subtract it from the highlighted cell.

    Then display the new number in the highlighted cell.

    Any help on this would be great.
    Thank you in advance.

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can try it with an InputBox, like this:

    Sub test()
    Prompt1 = "Enter a value
    Title1 = "Input requested
    Cell_Value = ActiveCell.Value
    User_Value = Application.InputBox(Prompt1, Title1, Type:=1)
    ActiveCell.Value = Cell_Value - User_Value
    End Sub

  3. #3
    Board Regular giacomo's Avatar
    Join Date
    Feb 2002
    Posts
    1,802
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi 12beavah,

    Have you considered using Paste Special|Subtract for this. It works nicely for what your trying to accomplish.

    giacomo

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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