Prompt User For Text To Fill Column
Dec 16, 2007
- Prompt User for Text String
- Fill in Column B from B2 to B(LastRow of ColumnA) with the Text String
For example if
Column A
Ant
cat
Dog
and the user enters the text string "Animal"
then Column B will look like
Column B
Animal
Animal
Animal
The number of rows in Column A vary across my excel sheets.
View 6 Replies
ADVERTISEMENT
Aug 23, 2013
Sometimes data comes in with various columns that need Concatenate.
I need VBA to prompt user to input which columns to use inside the formula:
Code:
'Place formula into A2
Range("A2").Select
ActiveCell.FormulaR1C1 = "=COCATENATE(D2&"_"&E2)"
'VBA to copy down formula until last row In my macro, D & E will vary, is there any way to make excel ask which two??
View 3 Replies
View Related
Sep 2, 2009
Split From Run VBA Macro From Another Procedure. will it autosave and open all the archives in the file i specify and loop?
View 3 Replies
View Related
Oct 4, 2008
I have created an addin that runs several macros. To enable the user to undo any changes, I keep a backup prior to them using any of the macros in the form of a worksheet named back00xx. I want a prompt to be displayed to the user to remove these backups at the closing or saving of the file. The problem is that as an addin, how do I get it to display this prompt as the open workbook is not part of the addin.
Could one have a looping routine that is checking every xx min/sec to check if the current workbook contains any sheets starting back00
View 9 Replies
View Related
Aug 7, 2009
This file pulls totals from external links. The way I have it set up is that every month our log is saved to a naming scheme involving the date, then a fresh log is created for the current month. So, for each month I have "log mm-yyyy".
Now, the chart file is a thirteen month rolling chart (meaning every month it must show the thirteen most recent month's totals). I have created a macro to automatically update the links, based on an input in cell A:1 (meaning you can enter a date in the past and view the thirteen months previous). The problem is that we have only been doing the log for 10 months. So, when the macro runs to update the links, and it gets to months 11 through 13, it pops up a window for the user to manually browse for the missing(non-existent) files. There are quite a few cells that contain links to various information on these logs. I get a prompt for each cell and have to click "cancel". Once I have clicked cancel through all of the broken links, then everything works great.
My question (after all that) is, is there a way to suppress the prompt for the user to search for the missing file? Like I said, this chart is for management, and they shouldn't have to click cancel a dozen times just o look at a chart. If the file doesn't exist, then just break the link.
Obviously once the next three months are over, this problem will disappear, but in the mean time I need a solution.
View 6 Replies
View Related
Oct 8, 2009
I'm building a spreadsheet that consolidates multiple worksheets into one. I've got that portion done, but what i need help with is a user prompt. I don't have an example at the moment, but it should be fairly straight forward.
Rather than consolidating all the data into one worksheet I want to consolidate only the rows that contain certain information. The column I need to query in each worksheet is "BL". The only thing is that column won't always contain the same data. Is there a way to do basically a prompt to where it searches for the data they want and if it isn't in there it just moves on to the next worksheet automatically?
View 9 Replies
View Related
Dec 18, 2009
Looking to write a macro which includes a prompt to the user for use in Excel 2007.
Specifics....Have a workbook including many worksheets with a common layout. Would like to write a macro to copy specific defined ranges from one worksheet to another but within the macro it would prompt the user to type in the worksheet name to copy the ranges from.
Example....User is at worksheet C in the file containing worksheets A, B, C, and D. User starts the macro and a prompt comes up for the user to input the worksheet name to source the ranges from (in this example A). User types in "A" in a dialog box and the macros copy/pastes the contents from range B4:B35 and Z2:z20 from worksheet A into those same ranges in worksheet C.
View 5 Replies
View Related
Jan 22, 2008
I am using VBA to create a weightloss calculator and everything is going fine ecept the Vbyesno boolean that will not allow me to delete the data that i want.
I used a macro to delete the information that i want to delete and i know it works because without the vbyesno, it works fine.
With the vbyes no, both yes and no do nothing when clicked and the yes no box just closes.
The macro code is stored in a private sub called "ClearAll"
My code is:
Private Sub Restart_Click()
Dim Response As Boolean
Response = MsgBox ("Are you sure",YbYesNo)
If Response = VbYes Then
Call ClearAll
End If
End Sub
What am i doing wrong?
I also want to make the no button the default, how do i do this in conjunction with the code above?
View 4 Replies
View Related
Sep 15, 2014
I have a cell (C16) that has a date format (such as 08/28/2014). I want the value of this cell to be "N/A" when cell C7 is "No". When C7 is "Yes", I want Excel to prompt the user to enter a date for C16 when they click on C16. The formula for cell C7 is =IF(C3="No","No","Yes"). That's where the value of C7="No" comes from. If I didn't need a date for the value of C16, the formula would be something like =IF(C7="No","N/A","______"). I have just recently started trying Excel macros due to a tool
View 9 Replies
View Related
May 29, 2013
I've recorded this code and am looking to include it in a button. I would like for when a user clicks the button assinged macro that the active sheet is cloned and saved as a CSV file. The user should be prompted before saving on where (file location) they'd like to save the file.
Sub CloneWorksheet()
'
' CloneWorksheet Macro
'
'
Sheets("SDW&Customer Workshop scheduled").Select
Sheets("SDW&Customer Workshop scheduled").Copy
ActiveWorkbook.SaveAs Filename:= _
"C:Documents and Settings1167916My DocumentsTestBook1.csv", FileFormat:= _
xlCSV, CreateBackup:=False
End Sub
View 9 Replies
View Related
Jun 19, 2013
I have got a protected sheet with macros, how can I ensure that users can only open the sheet as Macro enabled only otherwise the sheet would not open?
I understand that some users may have different Macro security settings?
View 1 Replies
View Related
May 2, 2008
I need a macro which collects data from two files and dumps it into a separate spreadsheet. I need it to prompt the user to select the two files, since the file names may change.
Once a user selects the files, the macro simply opens them, grabs the data (the data sits on a single sheet in each file) and pastes it into a file, and closes the 2 data files.
The Data sits in A7:N20 on both files.
View 14 Replies
View Related
Jun 11, 2013
Basically, in the "Thisworkbook" code , i have some code in the Workbook_BeforeClose section. Currently , it autosaves the workbook in a folder i have specified.
However, i need to add some code.I want to check that a certain cell has a value in it before the user closes the workbook, and if the cell is empty, show a messagebox asking him to enter a value.
I know how to get a messagebox to pop up, the only thing is once the user clicks the OK button,
i need the rest of the code execution to pause, allowing him to make the change then if he clicks the "X" (top right of the screen) to close the file or application, the filesave dialog appears and he can then save the document.
how to go about this because at the moment when user clicks ok, the messagebox just disappears and filesave dialog appears and he doesn't have a chance to edit the cell.
View 5 Replies
View Related
Apr 20, 2009
I am trying to display a message box for the user if there is "agency" in cell o8 but nothing in p8... I tried the following code but it doesnt work..
If Range("o8").Value = "Agency" And Range("p8").Value = "" Then
MsgBox "Please provide name of agency in cell p8"
Sheet9.Shapes("cross").Visible = True
Else
View 9 Replies
View Related
Jun 7, 2008
I know how to do this as an if function, but do not know how to do that as part of a VB module. If No Value in Column R Then Insert "Phrase" Otherwise Do Nothing
View 3 Replies
View Related
Feb 1, 2010
Is there some easy way to fill out column B referencing column A, but only incrementing by 1 row in A every 2 cells in B?
Example:
Column A:
A1 = 1
A2 = 2
A3 = 3
etc...
Column B (I would like to fill this, referencing column A):
B1 = A1
B2 empty
B3 = A2
B4 empty
B5 = A3
etc
View 4 Replies
View Related
Apr 29, 2009
how to add in a text box prompt that will modify code?
View 4 Replies
View Related
Sep 16, 2013
I'm trying to force the user to fill in three of the four available cells.
Initially they have a choice of filling in data for either:
Sheets(1).Range("C4")
or
Sheets(1).Range("C6")
But after that both Sheets(1).Range("C8") & Sheets(1).Range("C11") cells must also be filled in.
So it's either cells:-
C4 + C8 + C11
Or
C6 + C8 + C11
View 1 Replies
View Related
Mar 26, 2009
I have a dilemma.
1.I want to be able to a have a cell be filled with a certain value when the user enter data in Column C.
2.I know that this can be accomplished by a formula, but my spreadsheet will work my efficiently with a macro.
3.I do not know much about VBA but I believe that I will need a macro for each sheet that fills in the word.
View 6 Replies
View Related
Mar 2, 2012
I have a logon screen and would like to fill a combobox dependent on which user logon.
If User1 logon - options 1,2,4 must be in dropdown list
if User2 logon - options 2,5,6, must be in dropdown list, etc....
View 5 Replies
View Related
Jun 8, 2009
Is it possible to use vba coding to create a pop up user form by clicking on a button in excel?
I want to create a pop up form that a user can fill out with fields for name and address information. Then click a button to save and close the form based on the last name field box.
View 9 Replies
View Related
Jul 4, 2007
I have been able to create a userform that allows users to fill out a form without the need to navigate throught the excel spreadsheet form that has been created. to further refine this I am trying to use either a list box or Combobox to display specific items for certain cells, ie Travel Method (Air / Rail / Other), or Department (Projects / Finance / Engineering / Admin etc). I can create these in a spreadsheet without to much problem, but sofar have been unable to get them to work in the user form.
View 2 Replies
View Related
Oct 4, 2012
I have a file where I need the user to fill in a value in a single cell (A1) in order for the data validation I have set up in column B to work. Can I set up a second data validation in the cells in column B? Or is there a way to enter a data validation in cell B11 that would error the user if A1 is not filled in, and circle the cell (A1) that they need to fill in? B11 currently returns the sum of B3:B10.
A
B
1
Straight
2
Time
3
Sun
4
Mon
5
Tues
6
Wed
7
Thurs
8
Fri
9
Sat
10
Sun
11
Total Overtime
View 8 Replies
View Related
Dec 22, 2009
Excel 2003, I have a list of products with corresponding prices located on a hidden worksheet. I have a spot on another worksheet where users can select a certain product and next to that cell there is a column for price. What I want excel to do is auto-populate the price cell based on what product the user selects. For instance, if the user selects OD2000N, then I want the price to auto-populate with the corresponding price that is found on the hidden sheet. Like I said before, I know this has probably been answered, maybe even mulitple times but I can't seem to find the appropriate thread.
View 9 Replies
View Related
Jul 5, 2006
I am making a holiday form with names down the page and dates along the top, what I am trying to do is create a user form so it will automatically fill the dates to which they are on holiday. What I would like the code to say to find the cell at a specific date (column) and person (row) so it will enter a custom text or number.
The data that is submitted on the user form would be a start date and end date and the person’s name.
View 6 Replies
View Related
Feb 22, 2013
I've attached the sheet I'm working with. I need to delete most of column F and shift the rows to the left, but when I delete the cells it doesn't give me a prompt to shift the row, it just deletes the entire column or individual row. I need them to shift, what can I do?
Attached File : Coordinators Test.xlsx
View 3 Replies
View Related
Jun 10, 2009
I am trying to prompt the user for the directory to be saved in and file name to be saved as; then save the workbook in the input directory with the inputted file name.
View 3 Replies
View Related
Sep 24, 2008
I can't seem to make user-defined format that puts a text in front of a number and/or a text.
Let's say I have A1: 13, A2: texttext A3: text7 and I want to format a lot of cells to "Ilike 13" / "Ilike texttext" / "Ilike text7"... ie add the same text in the front of the cell, no matter what the content is.
I did manage it seperately, with "texttext" @ for text and "texttext" # for numbers, but what's the general one?
View 12 Replies
View Related
Mar 5, 2014
based on user date ranges entered on sheet1, I'm trying to write code that will write each month of the date range on other sheets across the 2nd row. at this point I'm getting "object required" error at "Set DateStart = Cells(2, 6)"
I also want the date format to be mmm-yy (Mar 14) on the sheets even if sheet1 has a different format. I tried using sourcerange instead of DateStart, but that didnt work either.
Code:
Dim projStartDate As Date
Dim projEndDate As Date
Dim DateStart As Date[code]....
View 1 Replies
View Related
Jul 13, 2014
When I hide columns in a column chart the different fill colors I used on specific columns no longer show up with the colors I originally had. Is there a way to maintain the proper sequence of column fill colors even when some columns are hidden?
View 1 Replies
View Related