+ Reply to Thread
Results 1 to 2 of 2

Needs help with inputting the formula in VB

  1. #1
    Registered User
    Join Date
    11-14-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    8

    Question Needs help with inputting the formula in VB

    Hi all,

    I have a user form that will enable user to enter a lookup based on the criteria reference no.
    When the user click Search, all the records in relation to the reference no. will populate the fields and user can edit the data and press "Save" button once done. The "Save" button will then update the records accordingly.

    I have to input two formulas to update a column in excel, those 2 formulas are:

    1st Formula
    Please Login or Register  to view this content.
    and

    2nd Formula
    Please Login or Register  to view this content.
    Now I want to convert the formula to VB so that when user click on the "Save" button, those 2 formulas will automatically update the field from the background.

    I have the following update record code set - I tried to convert the 1st Formula

    Please Login or Register  to view this content.
    Then I got an error 1004 application-defined or object-defined error when running the Form.

    Can anyone help me with getting the formulas to work?

    Also I need help converting the 2nd Formula to VB.

    Many thanks in advance for your reply and I really appreciate any help.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Needs help with inputting the formula in VB

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"

    In the mean time consider:
    =IF(N3="","",IF(N3<=M3,"Yes","No"))
    Please Login or Register  to view this content.
    Last edited by protonLeah; 11-19-2013 at 09:31 PM.
    Ben Van Johnson

+ 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. Inputting data from a formula
    By JohnFex in forum Excel General
    Replies: 13
    Last Post: 02-21-2012, 01:37 PM
  2. Inputting a formula which contains Quotes
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2011, 12:20 PM
  3. Need Help Inputting Formula
    By siroky25 in forum Excel General
    Replies: 1
    Last Post: 07-31-2010, 01:26 AM
  4. Inputting formula value to different cell.
    By darkerskies in forum Excel General
    Replies: 4
    Last Post: 10-24-2008, 09:13 AM
  5. Inputting text in a formula
    By PGalla06 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2005, 12:05 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