In Userform Textbox Formula to be typed and the same to be seen in Excel sheet Formula Bar

NimishK

Well-known Member
Joined
Sep 4, 2015
Messages
604
Hello
in cell A1 = when typed the following =(300+500)*5/10 i get result as 400 in cell A1


Will it be possible to implement the same in userform Textbox so that when i type the same in the userform textbox =(300+500)*5/100 but the result of value 400 is displayed in Cell A1 and formula also seen as =(300+500)*5/10 in formula Bar of Worksheet

will i have to use the same as per below link
http://www.excelfox.com/forum/showthread.php/2165-Formula-Editor-Bar-in-UserForm-TextBox

Thanks
NimishK
 
Last edited:

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
2,575
Office Version
  1. 365
Platform
  1. Windows
Actually if you type =(300+500)*5/10 in the textbox and run this code

Code:
Sheets("Sheet1").Range("A1").Value = TextBox1.Text

it will get you what you want.
 

NimishK

Well-known Member
Joined
Sep 4, 2015
Messages
604
Thanks Akuini
2 Questions on above. Yes i get the formula in Formula bar when entered in Textbox and Value of 400 in A1. Perfect

1. How to Display Value as 400 in Textbox2.text ie reading the value of A1 in textbox2 and not the formula. Only 400 to be displayed in Textbox2
2. How to get Excel sheet msg Error if error ocurrs when typo error or any wrong input of formula in textbox1 to enter formula.

Thankx NimishK
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,109,359
Messages
5,528,226
Members
409,809
Latest member
VICKRAM

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top