Input Box To Pass Text To Cell?

Dec 31, 2013

I have the below code which creates a new template

Code:
Private Sub NewTemplate_Click()
Dim Tsh As Worksheet
Set Tsh = Sheets("TEMPLATE")
Tsh.Copy After:=Sheets(Sheets.Count)
shName = InputBox("Please enter new sheet name:")
ActiveSheet.Name = shName
Tsh.Visible = False
End Sub

What I would like to add to the above code is two more inputbox prompts, the first should prompt the user for a Name (text and length) to go into the new sheet cell A6. The the second input box should as for code, (number any length), to go into the new sheet cell b6.

View 3 Replies


ADVERTISEMENT

Pass Input-box String From Sub To Main

Oct 23, 2013

how to specify a file extension type for a browseforfolder part of what i've been doing.

It's not calling correctly as i'm not sure how to feed the inputData string back into the main.

Obviously there's probably better ways of doing this, but can my way be corrected easily?

I've been looking into ByVal and ByRef, but have only seen examples goin from main to the sub and not the other way.

Code:
Sub Main()
Dim strFolderName As String
Dim strFolderTest As String
Dim FRCntrHiLim As Variant
MsgBox "before calling inputbox"
Call InputBoxTest(inputData) '

View 4 Replies View Related

Input Text In Given Cell After Any Input In An Area

Feb 28, 2007

I am just starting to get my feet a little damp with VBA and I am trying to make a macro that will act whenever any text is entered in any cell within a 3x3 square. Whenever any text is entered in any of those cells I would like it to enter a text ( "X" ) in a cell which is specified by a cell in the spreadsheet (this cell will output which cell the macro should write the text in in this format "A:1" or "C:3"). How can I make the program act only in reaction to the user entering thier text, and also, how can I get the macro to read A:1 and enter the text into that specific cell? Any help would be so awesome, the book I have is really difficult to navigate.

View 9 Replies View Related

Excel 2003 :: How To Pass A Parameter In The Input Range

Mar 21, 2014

I have a combobox in a excell sheet. It is possible to pass a parameter in the input range instead of Parm!$B$1:$B$10

View 2 Replies View Related

Leave Text In A Cell When Same Cell Has No Text Input

Jul 8, 2013

I am trying to figure E.g. when A1 is empty i want it to equal a text.

A1 has a text "Quote No" in it permanently until other text is put in

Purpose so that they people know where to enter the applicable text.

View 9 Replies View Related

Restrict Cell Input Based On Text Of Another Cell

Jan 29, 2008

I have two coloumns on a worksheet. In the first column I have data validation drop down list. I want to be able to: if the first column "Other" is chosen then the next cell will allow text for description, if anything other is chosen in the first drop down list cell then I want the next ( text for descritption ) cell to be resticted.

View 4 Replies View Related

Preformatted Text In Cell, Using Form Input

Jan 8, 2010

I have a question about using the form input method for an inventory sheet.
My issue is that I want to have a column of cells have a predetermined text acronym "THS-"

I thought to place this in the column by copy pasting but then when I run the Form input for each row and column it gets errased.

View 9 Replies View Related

Finding A Formula Based On Text Input Into A Particular Cell

Aug 22, 2014

I do data entry for a driveway company. I get addresses and phone numbers, and then call the people to offer services. I keep track of my calls on the spreadsheet, color coded for my results, green for leads, yellow for voicemail/no answer, and red for not interested.

I have formulas in cells M2 through M8 to give me my overall stats for the calls I have made, it filters them by color for leads, missed calls, and rejections, and a couple other stats (mostly for my own curiosity)

What I'm trying to add is the cells L10 to M13, I want to be able to input a date, for instance 8/15, and have it run the same stats, just for that day essentially. So, I need it to search the last 2 columns in the table for the text that I input into cell M10, and then run the color based formula on those cells, and total them up in the appropriate cells, M11, M12, and M13.

The 2 Stats tables are the same at the moment in the sample, as I only included one particular street that I have mapped, my actual table is nearly 3000 rows.

View 3 Replies View Related

How To Input Text Into Cell Based On Database Using Form

Jan 23, 2013

i was wondering if it was possible to move database entries from sheet to sheet using a user form ? any examples for this ?

View 1 Replies View Related

Pull Value Of Cell And Input In Another Cell That Has Text In It Already?

Feb 24, 2014

I have a table of data for items, and in one column I have links that go to webpages for those items. I need to pull the value from a particular cell and input that within a text link in another cell. For example:

A1 has the value "K111"

in D1 I need to have a link such as "<a href="http://link/K111>Click Me></a>"

You'll notice it's link with the K111 value input in it. I need to replace the K111 code that will put the value there. I know how to do this normally but not when it falls within other text. Is this possible?

View 1 Replies View Related

VBA Code To Copy Data From Text Box And Input Into A Cell In Another Worksheet

Mar 24, 2009

This is probably far easier then I am making it but I need to take the information that is in a textbox created through the control toolbox and copy and paste that information into a cell on different tab in the workbook. I have tried the infamous google and haven't been able to find much. The excel books that I have don't really touch on the control toolbox functions.

View 2 Replies View Related

Re-establishing Formulas On “text” Input For A Specific “cell” = Original Formula Act

Nov 23, 2009

See attached worksheet for reference. Is it possible (while utilizing the same spreadsheet on a weekly basis) to zero a spreadsheet subsequent to its use. Importantly however, all relevant formulas must remain perfectly intact and will re-establish themselves once relevant data is placed inside an individual cell? In this case, as soon as a “Name” (or even a letter) is referenced inside the “Name” column: H10:H19?

In other words, the entire sheet is blank bar the top date and respective headings. Once any text is placed inside cells H10:H19, the formulas from the associated Row re-applies itself to the “Week-Start” dates, “Week-End” dates and references a default “Phone” amount for ‘$10’? The Data Validation formulas I’m sure would remain undamaged? This would prevent ‘text clutter’ (such as dates extending to the bottom with no apparent referencing or connecting information?

View 2 Replies View Related

Excel 2007 :: Userforms - Input Cell Value (via Text Box) And Output Corresponding Values From Resulting Row

Jun 24, 2013

I have a simple spreadsheet of an inventory. Each row on this spreadsheet represents the data related to an item. I would like for a user to be able to INPUT a serial number via a userform. Then, I would like for the program to OUTPUT some information about that particular item (a few cells that should be on the same row as the serial number).

I attached an image diagram that may better represent what I am trying to do.

View 9 Replies View Related

Pass .txt File Text To Variable After Nth Delimiter

Aug 20, 2007

I am having a problem reading from a file. I am working with some old code. I am reading information in from a txt file. The information on the txt file is separated by commas on each line. My question is, how can I read in for example, the third section on the first line. By section I mean...

line 1:
section1, section2, section3, section4, section5

I want to read section3 into a string variable. If anyone can help me please post. I am having the hardest time finding this online.

View 9 Replies View Related

VBA To Automate Text Input Into Input Box

Feb 6, 2014

I am in need of VBA code so that I can fill out an input form generated by someone elses macro input box. (I am the user, not the one developing the input box).

I am working to streamline a whole cluster of macros and this input box is currently my bottleneck. When the input box pops up, instead of me manually typing, I want to autofill the space with "104" and then click 'ok' uisng VBA.

I can not modify the actual VBA that created the input box (ie make 104 the default) because other users need the box to be blank.

find out how a developer would change the original vba code, not how a user can interact with an input box by using vba.

View 3 Replies View Related

Input In Multiple Cells To Generate Input Into Single Cell?

Feb 22, 2014

I have a spreadsheet with 5 columns. A1 to A5

Entries are made into columns A2 to A5 but only ever one entry across all cells

If an entry is made into A2 to A5 the I need a "P" to be placed into A1

View 4 Replies View Related

Input Box To Create And Input Info Into A Formula Which Then Populates A Cell With A Value

Jul 24, 2014

I am trying to create a macro which gives me an input box. I need to enter 2 numbers into the input box. It would be as follows:

Input Box Msg 1 - "What is your labor cost?" (NUM1)
Input Box Msg 2 - "What is your productivity rate?" (NUM2)

Then I need the macro to take this info and enter it into a formula which changes according to the row which you are on. (I need the macro to work based on which ever cell I currently have selected). The formula would be this if I currently had a cell on row 10 selected:

=(NUM1*(NUM2*$H10))/$H10

So, if I currently had cell L10 selected, and I ran the macro and put 100 in for "NUM1" and 10 for "NUM2" and my sheet had 20 in cell H10, then the macro would enter the number 1,000 into cell L10. If I had L500 selected, then the macro would enter the final number into cell L500 based on what value H500 contained.

View 9 Replies View Related

Transferring Of Input From Input Cell To Output Cells?

Jun 8, 2014

I would like to know if it is possible to transfer values of cells this way?

I've attached the excel file for easier reference.

View 3 Replies View Related

Macro - If Cell In Column Is Blank Then Input Text Into Same Row In Another Column

Sep 19, 2008

I am looking for a Macro that will search a column for blank cells, and when one is found will add text to the same row in another column. For example: The below is a spreadsheet. I am trying to find something that will search through column "C" in this case and add text (of my choice) to Column "A" if the cell is Blank. So Since cell C1 is Blank then Type "ERROR" is cell A1.

A B C D E
1 X X X X
2 X X X X
3 X X X X X
4 X X X X
5 X X X X

View 9 Replies View Related

Create Text File And Input Text?

Feb 27, 2014

how can I create a text file in a folder called test and then input texts in this created textfile

so say I had 2 input values

1 said hello other was james

i need to create textile in this folder and then have this written in the textile and saved (printed like the below)

hello

james

thank you

editing and inputting some text in an existing textfile and inputting the Inputbox values at the end of the text file like the above

View 7 Replies View Related

Pass Cell Value To VBA & Round It Off

Oct 1, 2006

If I have cells that are formatted to a certain decimal width, say, 2 digits, cells that have the value of 3.599 will appear as 3.60. When I reference this cell in VBA, how can I have it pickup the 3.60? Currently, something like Range("A1") or Range("A1").Value will pickup the 3.599.

I feel like theres something thats like Range("A1").XXXX that will get me there, but I can't seem to guess it.

View 6 Replies View Related

Pass Value: Last Used Cell In Column

Oct 30, 2006

I want to use the value of the last cell as a starting value and add a number to it and assign it to the next cell.
i have this

Sub a()
For i = 15 To 100
Cells(i, 2).Value = Cells(i - 1, 2).Value + 6
Next i
End Sub

how do i incorporate this

Sheets("Sheet1").Range("A").End(xlUp).Offset(0,0).value

into the code above so that the value of the last cell can be the starting value.

View 3 Replies View Related

Pass Each Cell Value In Range To Cell & Run Macro Code

Apr 28, 2008

I have workbook template that I use to generate reports from a list of depts. This list is contained in a drop down cell that is a named range in a different worksheet. My current process is as follows:

-Select Dept Name from the list
-Click a command button which is assigned to code that calculates and saves to a file
-Repeat for next report until all reports are generated

I would like to automate this process by producing all reports with a single command with the following functionality:

-The Dept Name needs to be populated in the specified cell containing the current drop down because it drive various vlookups and other formulas
-If possible, I would like to retain the drop down functionality as I would like to have the option of running an individual report or running the “batch”.

View 2 Replies View Related

Pass Cell Content Into A Filter

Jul 22, 2009

I am doing a simple filter list copy and paste into another worksheet and I have a challenge trying to pass the value in Cell B1 (which contains the city) as a filter parameter in the filtered list.

View 2 Replies View Related

Pass Cell Values To VBA Array

Sep 18, 2009

i'm trying to do my homework which requires me to pass values from an array in excel worksheet to VBA and print it in a msg box

i've tried

dim arr as variant
arr = range("A1:A6").value
msgbox arr

but it didn't work.

that's the first step of the homework the second is i have 2 list of array

year:1999 - 2002
profit:10,20,30,40

i have to find the max profit and get the year when it occurs

View 9 Replies View Related

Pass Cell Value Using Variable Row Number

Aug 15, 2008

Following statement works for me:

bdcTerm1 = ThisWorkbook. Sheets("ws2"). Range("A1").Value

But instead I want to parse through 50 rows and dynamically get the value instead of using a static Range("A1"). So I am trying to do the following:


For Row = 1 To bdc_rows
bdcTerm1 = ThisWorkbook.Sheets("ws2").Cell(Row, 1).Value
bdcTerm2 = ThisWorkbook.Sheets("ws2").Cell(Row, 2).Value
Next Row

But I get errror.

View 5 Replies View Related

Pass Cell Variable Between Macros

Jun 11, 2007

I have a macro that nicely select the named range that the active cell is in. I want to chain on to that macro a macro that has a parameter a range with that active selection. I dont see how to "take" the active selection on the worksheet from within the macro and pass it to another. I assume I could change the cellInRange macro to return a range, however I dont yet see how to do that.

View 2 Replies View Related

Pass Cell In Loop To Procedure

Jan 1, 2008

I want to put some colour in the cells B2, B3, B4, B5, etc and a put black the edge of every box. For do that i make a subrutime that put some color in the range that i want (only if i write "B2" or "B2:B5"), but if i want to put a black edge in all the box i can't do "B2:B5". Then i tried to do something like:

For i=2 To 5 Step 1
Call Boxcute(ActiveSheet.Cells(i,2))
Next i

Sub Boxcute (Box As String)
Range(Box).Selection
etc.
End Sub

But Excel gives me a error with Box and Range.

View 2 Replies View Related

Pass Date In Cell To Variable

Jun 3, 2008

I am using this program in one workbook to capture the datevalue in integer from another workbook which i opened. But the program as it reaches the line x2=Datevalue( Cells(2,14).Value) gives a Type Mismatch error.

Public Sub find_date()
Dim x2 As Long

'I am trying to activate the last opened file by using workbooks.count
Workbooks(Workbooks.Count).Activate
Worksheets("Sheet1").Cells(1, 1).Select

x2 = DateValue(Cells(2, 14).Value)

End Sub

Auto Merged Post Until 24 Hrs Passes;btw..the cells(2,14) has a date, formatted in the type of mm/dd/yyyy.

View 4 Replies View Related

Pass Decimal To Variable & Then To Cell

Jun 3, 2008

Why when I want to use a varaible with a value like that 2.1, 0.9, 3.5 in a code to create a formula gives me an error? How to get it work?

Sub Code1()
Dim k As Double
k = 2.1
Range("h11").Formula = "=" & k
End Sub

Strange, but it works well if k is an integer with no Decimal Fraction, like 1, 2, 5, 11 ..

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved