Lookup In Workbook Specified By User
Oct 21, 2007
i have 3 files :
1-april 2007
2-may 2007
3- total
i want a macro that that 1+2 and with "vlookup" out the cells in "total". i start to record the macro but ... it's not work at all. i want to put an input box that ask the user "what month and year" and then put the relevant file in the vlookup.
View 2 Replies
ADVERTISEMENT
Mar 7, 2008
way of creating some kind of xy lookup function to a data table in Excel 2003 or 2007.
To explain what I'd like, if Row 1 and column A contain a a range of values (e.g. from 1-10), I would like to be able to search these lists and select two values (e.g. 5 and 5) then return the value of the cell at their intersection (e.g. F:6 in this case)....see below... What would be the best way to do this?
ABCDEFGHIJK1123456789102132435465?7687981091110
Ideally I'd like the user to be able to enter these xy values and set up a nice user friendly form or drop down list. If it was a user completion field it would also need to accept ranges, e.g. if 4.3 is entered it selects value 4.
Essentially this is like a grid reference Easting and Northing. The actual spreadsheet I'm working on is 300 rows by 200 column containing 12 worksheets of this size, would it be possible to do this and return multiple values (same cell ID e.g F:6 above) from different worksheets?
View 11 Replies
View Related
Apr 23, 2008
I would like to create a user form that will display the results from a lookup formula. The userform would have 2 textboxes, so from the formula below BZ109 would be textbox1 and CA109 textbox2. Once data is entered in these textboxes you would hit submit to return the results in a message box. What would the code be for the sumbit button?
=VLOOKUP(BZ109, INDIRECT(CA109), 11, 0)
View 9 Replies
View Related
Aug 30, 2009
=LOOKUP($C1,$A1:$A1,$B1:$B1)
Though i wanted to rid the Na error from it when C is blank
I seen a few ways, And wanted to try the method of using Countif becouse it can be used withen the same cell without using extra cells like another method i seen "=IF(ISNA(A1),0,A1)"
what i know of countif
This function counts the number of items which match criteria set by the user.
=IF(COUNTIF($A1,"")),LOOKUP($C1,$A1:$A1,$B1:$B1),"")
so how the heck can the countif function be used to rid the NA of a lookup. i just cant see a relationship between counting a lookup.
View 5 Replies
View Related
Sep 10, 2007
Trying to determine who has a file open, the code below works for simple files. However if the workbook contains macros and user forms it seems there are multiple occurances of the search terms strFlag1, strFlag2. How can I determine the last user
Function LastUser(path As String)
Dim text As String
Dim strFlag1 As String, strflag2 As String
Dim i As Integer, j As Integer
strFlag1 = Chr(0) & Chr(0)
strflag2 = Chr(32) & Chr(32)
Open path For Binary As #1
text = Space(LOF(1))
Get 1, , text
Close #1
j = InStr(1, text, strflag2)
i = InStrRev(text, strFlag1, j) + Len(strFlag1)
LastUser = Mid(text, i, j - i)
End Function
Above code taken from Determine Last User
View 2 Replies
View Related
Jun 27, 2008
I am unable to add which user made the change to the specific cell. The code used is:
Dim vOldVal 'Must be at top of module
Private Sub Worksheet_Change(ByVal Target As Range)
Dim bBold As Boolean
If Target.Cells.Count > 1 Then Exit Sub
On Error Resume Next
With Application
. ScreenUpdating = False
.EnableEvents = False
End With
If IsEmpty(vOldVal) Then vOldVal = "Empty Cell"
bBold = Target.HasFormula
With Sheet1
. Unprotect Password:="Secret"
If .Range("A1") = vbNullString Then
.Range("A1:E1") = Array("CELL CHANGED", "OLD VALUE", _
"NEW VALUE", "TIME OF CHANGE", " DATE OF CHANGE")
End If..................................................
View 3 Replies
View Related
Feb 12, 2009
How can I prevent a user from opening another workbook in an Excel session "from the outside"?
I'm fairly new to VB. I'm developing (in VB 2003) a simple but SECURE Excel environment which will allow a user to update a hidden Master_Records workbook. I need to keep the user's Excel session secure...for example, I've disabled all Excel Toolbars and Command Buttons, effectively preventing the user from doing anything except filling in some cell values and clicking on a few custom buttons in the worksheet. But how can I prevent the user from opening another workbook into the active session from his desktop and introducing some malicious code into the session via that route?
One respondent in another forum (the only one, in fact) suggested that I look into "instantiating workbook level events" so that I can detect when other workbooks are open. I'm not sure what that means, is there someone here who could give me some guidance into that solution?
View 13 Replies
View Related
Sep 24, 2009
I wrote a code that is suppose to save the workbook every time a change is made but so far I have been unsuccessful at getting it to work. The workbook contians 7 worksheets.
This is the code I wrote to try and accomplish this task ....
View 6 Replies
View Related
Oct 11, 2013
I have a workbook that is shared between 10 users and this work book is known as Master, what I don't want to happen is for one of the users to over write and save it. So is there a way one not allowing the user to save but allow the user to save as.
View 2 Replies
View Related
Apr 18, 2007
Need a way of quickly telling whther a user as a workbook open without trying to open the workbook yourself? I have many individual workbooks which I need to regularly update, before I can update them I have to check whether anybody else has them open and then wait until they are out before I can do the update.
View 9 Replies
View Related
Apr 10, 2008
if it is possible to prevent a workbook from being saved other than by a macro (So no saves on Ctrl + S or File Saves). Basically, I want to allow users to use a template that I have set up, but I do not want to allow them to be able to save the document.
View 9 Replies
View Related
Aug 2, 2008
How to display the userform when the workbook is opened?
View 9 Replies
View Related
May 12, 2009
Have 2 workbooks very similar and need to copy a working user form to newer workbook. Exported and Imported the user form to the new VBA project but can't figure how to bring user form into the new worksheet.
View 9 Replies
View Related
Feb 28, 2007
Using Excel 2000, I have a shared workbook which is effectively a single sheet, flat database. Rows contain dates, and when certain dates occur, I want to send an email alert to specific users. I have searched and found lots of guidance on that aspect, but am wondering how best to trigger the email alert. At least one, and up to 10 users access the shared workbook at different times of day, and I only want to review the data and send the email alerts to the relevant users once per day.
I thought about a timed event, but cannot be sure the shared workbook will be open. I wondered whether an event in Personal.xls might do it, if I ensure I open Excel every day, but it's not ideal. Finally, I wondered if I could somehow trigger the alerts when the first user opens the workbook - but can't find how to capture that.
View 2 Replies
View Related
May 2, 2009
I have a program in Excel with VBA code. The VBA code is all under password protection.
Is it possible for Excel to carry a virus or worm or whatever to another user?
If it can, how does a virus get into the Workbook?
If it can, how do I protect the program from carrying a virus?
View 8 Replies
View Related
Apr 27, 2014
I am using this code to copy columns C,D, and P from a user selected workbook into position C,D,E of workbook "Checklist.xlsx" (the one from were I run the VBA code). I don't have a clue about VBA, just have been gathering info, but the code works pretty fine. The only issue is that it opens twice the workbook "wbExt" hence the system prompts me if i want to reopen the already open workbook.
Some questions:
1) Is there a way to copy the 3 columns at once? something like "Columns("C:D, P").Select".
2) Is there a way to select the workbook from were to copy the column without needing it to actually open?
3) is there a way to paste the columns starting from row 3 instead of row 1 (Range("C1").Select)?
View 2 Replies
View Related
Feb 12, 2014
I've been tasked at work to make an excel file to do more than what I think I can figure out on my own. What I need done is this:
1. Every Monday, check excel file for data
2. If data exists, send email with said data
Here's my issues:
How do I get the workbook to open while logged off the computer? The file is stored on a share network drive, not locally. How do I get it to send an email without someone logged on to click "send"?
I tried using windows scheduler, but I don't have sufficient privileges to run as batch (IT restrictions).
View 2 Replies
View Related
Sep 10, 2009
Is there a way to have an open user form and still be able to navigate in the current workbook/spread sheet(s)?
View 6 Replies
View Related
Jul 16, 2014
I have a worksheet that contains about six different tabs. When this form is completed some users might want to have certain tabs copied into a different workbook. Unfortunately each user might want to copy different tabs. I was wondering if there was a Macro that I could write that would ask the users which tabs they want to copy into a new workbook.
View 4 Replies
View Related
Jul 28, 2004
I have a program that opens an excel-workbook, I first check whether the file is opened by another user(open for read-write). This works fine, but I'd like to know which user has the file open with VBa code. ex.
workbooks.open ....
if open
then msgbox " Book opened by user"
end if
So it's the same as you open an excel(with your windows explorer) on a network and you get the message that the file is already opened by the user....
View 2 Replies
View Related
Apr 23, 2006
I'm trying to limit the controls users have on a specific workbook. Problem is I would like for them to have this workbook open throughout the day and if I look all the controls then they will be locked out of these controls on other seperate workbooks they open. The only reason I ask is because of some awesome code I just found by Dave Hawley. The code is...
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With Application
. CommandBars(1).Enabled = Not Sh. Name = "Sheet1"
.CommandBars(" Formatting").Enabled = Not Sh.Name = "Sheet1"
.CommandBars("Standard").Enabled = Not Sh.Name = "Sheet1"
.DisplayFormulaBar = Not Sh.Name = "Sheet1"
End With
ActiveWindow.DisplayHeadings = Not Sh.Name = "Sheet1"
End Sub
This works great with one exception. It will only block the menus for one Sheet.
In my workbook I have 8 sheets and would like to apply this to 4 of them. Is there any way to modify code to hide menus on mores than one sheet. Also while I'm in the neighborhood. Is there a way to hide the sheet tabs for this workbook only. So once again if a user opened another workbook they would be there?
View 5 Replies
View Related
Nov 4, 2006
how to create user logins and passwords for five users for one workbook. Also, preferrably to have a message to prompt for entering the user name and password at the first worksheet (e.g. the main page where there it is usually the company logo page) when the workbook is open.
E.g. there are five employees and we would like to create five different logins and passwords for them. So when they open the workbook, it would be the first sheet of the workbook to appear first and they would then be prompt to enter their username and password. If one of the employees leave the company, we can still quite easily change the name to the new employee.
View 6 Replies
View Related
Jan 25, 2007
I have a workbook that has a macro that needs to run before it is closed. I have a button on my sheet that runs that macro and then closes the sheet. Is there a way that I can disable the "X" at the top right hand of the workbook and force the user to close the workbook via my button?
View 3 Replies
View Related
Mar 3, 2007
Is it possible to have an "if then" statement that would send the user to another page in the workbook? For instance..... =IF(D12="Mobile","Sheet2!","Sheet3!"). I know this does not work but is there another function that would do it? I am very new to vba and am sure it is easy there but I do not have a good handle on it yet.
View 5 Replies
View Related
Aug 6, 2007
I have a work book that contains 10sheets. considering one as main sheet remaning as sub sheets. I want to open main sheet from all other remaining sheets using a common button.when I tried normally is shows compile error: Ambiguous name detected. Any other way to solve it.
View 7 Replies
View Related
Sep 13, 2007
I have an excel file with data in it.I also have designed an user form so that the user can select few options in that to filter the excel file and get a new file. The reason i am doing this is because the people who are going to use this do not have any knowledge of excel. In the sample attached, the tab "Data" has the data in it. The User form should filter this particular sheet and throw out a new file. In the userform, I have mentioned the fields to be filtered.
View 2 Replies
View Related
Jun 25, 2008
I have a macro that runs when the workbook opens. At the end of my macro I've added a Yes/No box. If 'No' the workbook closes without saving. If 'Yes' I would like to restart the macro. I can close it ok, but I don't know how to restart the macro from line 1 when 'Yes' is selected. Here is what I have:
YesNo = MsgBox("Done! Would you like to run again?", vbYesNo + vbCritical, "Caution")
Select Case YesNo
Case vbYes
'I don't know what to put here :(
Case vbNo
ActiveWorkbook.Close savechanges:=False
End Select
View 3 Replies
View Related
Jul 13, 2012
I am trying to have an operation run when opening the Workbook. The UserForm opens fine, but I get an error when the GoButton_Click sub runs. The error file is not very comprehensive.
The user is promoted to 'Delete' or 'Cancel' before the sheet is deleted. I do want to select 'Delete' for the user, but I'm not sure how to do this.
The error mentioned occurs after the user selects 'Delete'. The error is:
Run-time error '-2147417848 (80010108)':
Automation error
The object envoked has disconnected from its clients.
VB:
Option Explicit
Private Sub UserForm_Initialize()
Me.Choices.List = Array("Choice 1", "Choice 2")
End Sub
Private Sub GoButton_Click()
If Templates = "Choice 1" Then
[Code]....
View 5 Replies
View Related
Oct 13, 2008
how do i go about setting a message box to pop up every 10 mins or so prompting the user to close the workbook.? i want it to be as irritating as possible! iv'e had a look at ontime but cant get my brain into gear!also don't some of these timers fire even if workbook closed?
View 4 Replies
View Related
Aug 6, 2012
I need to filter data based on criteria based on user input form that is in another workbook. For example, I have a list of departments, I want to create a userform for the user to enter department number and then have excel filter only the data belonging to that department. The person will then update the department records and save the file.
Here is partial code I have been working on but having difficulties:
Dim FilterCriteria
Dim CurrentFileName As String
'Get the current file's name
CurrentFileName = ActiveWorkbook.Name 'how do I call another workbook?
[Code]...
View 1 Replies
View Related