+ Reply to Thread
Results 1 to 12 of 12

Dialog box to enter number

  1. #1
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Dialog box to enter number

    Hi,

    I want a macro to get a dialog box with "Please enter your number" and once the number is entered it should be updated in 'Cell A3' and then it should Vlookup with the data in B3:B15 and if the number entered is matching then it should continue and if it is not matching then the excel should close.

    Can anyone please help me out with this macro.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Dialog box to enter number

    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.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Dialog box to enter number

    Thanks,

    attached is the sample excel which has the data.

    when i use the macro, i want a input box to appear with "Enter the Serial Number" and the serial number entered in that box should update the cell A3 in sheet1.

    In Sheet 2 there is list of serial numbers and in L3 there is a vlookup, if serial number is not matching i.e., L3 is #N/A then it should close the excel.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Dialog box to enter number

    Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Dialog box to enter number

    Thanks man, its awesome....

    I want 1 more favour..

    Attached is the excel which has 5 sheets (4 sheets which are updated mannually and then i copy all the data from the individual sheets and paste them in the consolidated sheet).

    I want a macro which copies the data from the sheet 1 - sheet 4 and paste it in the consolidated sheet (from Column B to F).

    Note: The data i.e., no.of rows may fluctuate and some times one of the sheets may be blank.

    Please help....
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Dialog box to enter number

    Try this:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Dialog box to enter number

    i tried but its not giving the correct result.

    can u look t the attched file which has your macro, i have highlighted data which is repeating..

    i want it copy the data in the consolidated sheet from 2nd row, as the 1st row would be the heading.

    thanks for all your help..
    Attached Files Attached Files

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Dialog box to enter number

    My apologies. Forgot to add a row and I had a typo. Try this:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Dialog box to enter number

    Now its perfect, only thing i want to add in this macro is..

    if there is no data in Row A2 of any of the sheets then it should not pull any data from that particular sheet.

    I have attached the excel and highlighted it.

    thanks
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Dialog box to enter number

    Quote Originally Posted by Mr.India View Post
    Now its perfect, only thing i want to add in this macro is..

    if there is no data in Row A2 of any of the sheets then it should not pull any data from that particular sheet.

    I have attached the excel and highlighted it.

    thanks
    Can anyone help with this..

  11. #11
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Dialog box to enter number

    added 2 lines of code to that of @alansidman code.

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  12. #12
    Registered User
    Join Date
    08-04-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Dialog box to enter number

    Thanks a lot mate.. It works fine..

+ 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. [SOLVED] How do I create a button to enter a number in a cell and then tab/enter to next cell
    By MatiasGarcia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2013, 05:29 PM
  2. [SOLVED] Create User Input Dialog Box to Enter Keywords for Word Search in a Cell
    By vcs1161 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2013, 01:36 PM
  3. auto enter number macro then search for rest of number
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2013, 04:24 PM
  4. Enter text/value from dialog box
    By govanalyst in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-19-2012, 02:03 AM
  5. number of copies in a print dialog box
    By LHaro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2005, 01:05 AM

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