+ Reply to Thread
Results 1 to 4 of 4

Input data to sheet using texbox but with some conditions

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Input data to sheet using texbox but with some conditions

    Hello, everyone
    I am using a combobox and text box to input some data in sheet.

    I want if I input data texbox1, then I want to minus the value of sheets("of").range.("C6").Value from textbox1.value before inserting the data to cell

    For example
    If
    sheets("of").range.("C6").Value = 146
    And
    I input data in textbox1 = 156
    Then add value to sheet through is difference of both value
    156-146 = 10
    Input value should be 10

    Thanx
    Last edited by HaroonSid; 01-24-2017 at 02:53 PM.
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Input data to sheet using texbox but with some conditions

    Hi HaroonSid,

    Ouch!, Sorry, but I don't follow your example description. LOL.

    Please attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Thank you.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Input data to sheet using texbox but with some conditions

    Thanx a lot for reply guru ji
    Sample will upload tomorrow because I am no using mobile,
    I will explain u one more time, what I want

    For example
    I input data in texbox1 = 156
    And
    Range
    sheets("of").range.("C6").Value = 146
    Then before sending data to cell using text box I just want less
    sheets("of").range.("C6").Value from textbox's value

    156-146= 10

  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Input data to sheet using texbox but with some conditions

    here is sample worbook
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Transfer data from input sheet to data sheet by using command button
    By vinh1985 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2014, 12:17 AM
  2. [SOLVED] Bulk import. (Copy Data from one sheet to a main sheet with conditions)
    By DanzaNZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2013, 12:24 AM
  3. [SOLVED] showing message box if the result of texbox doesn't match with the range then clear texbox
    By hamidrezaxy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2013, 01:04 PM
  4. Code for a Texbox Item for input of Purchase Orders
    By Fireeyes2l2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 11:37 AM
  5. Replies: 9
    Last Post: 04-04-2011, 12:03 AM
  6. Can't get listbox which displays rows in sheet to add texbox value to selected row
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-02-2010, 01:43 PM
  7. Find data in table from from two input conditions?
    By gdallas in forum Excel General
    Replies: 4
    Last Post: 02-11-2010, 12:31 PM

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