Identify User With Native Excel Function? Get?

Jun 14, 2007

I am trying to identify the current user, similar to Environ("Username") in VBA

I have a vague recollection of a formula from an old version of Excel (4.0??) that I've read about that might acomplish the task.

I seem to recall reading about a function, I think it was Get
that is not supported, and not that well documented.

Does anyone out there know what I'm talking about.


Otherwise does anyone know of a native worksheet function that would return the current username?

View 9 Replies


ADVERTISEMENT

Identify File User

Dec 20, 2006

VBA code Identify which user has a particular file open. This file is on our shared drive and recently we've had people open the file and leave their desk. They haven't input an Excel username so frequently we cannot tell who has the file open to ask them to close it.

I'm trying to write a macro that will tell me if the file is open and if it's open, who has it open (using their computer login name).

View 9 Replies View Related

How Can I Identify A User Over A Network

Apr 28, 2008

I have written a function (with the help of the good folk on this wonderful message board) that is able to check whether a given spreadsheet is currently being used by someone at my work. There are potentially multiple users for the workbooks that my system needs to access. FYI, I work in a bank so we have a pretty good network.

The code for my function, as well as the TestOpen(-) function that it uses, is below.

Ideally, if a workbook my system needs is currently being used on someone else's computer (Case=1 in Select statement, then Err0) I would like to be able to have a userID returned to me so that I know who I need to call to shut the model.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Open_Selected_Drone__EXEC(fs, fileLocation, fileToOpen, testOnly)
Application.ScreenUpdating = False
myName = ActiveWorkbook.Name

Application.StatusBar = "Checking availability of " & fileToOpen
iOpen = TestOpen(fileLocation & "" & fileToOpen)

Select Case iOpen

Case 0: ' the file has been found and is not in use
rv = "not in use"
If Not testOnly Then Workbooks.Open Filename:=fileLocation & fileToOpen, WriteResPassword:="j"

The old version of this message board used to have an "insert code" button. I cant see it anymore. Am I simply meant to paste code into this message box now?

View 9 Replies View Related

Excel 2010 :: Replicate Conditional Formatting Using A User VBA Function?

May 6, 2014

Using Excel 2010.

The background to this question is that I'm trying to replicate conditional formatting using a user VBA function, because I require a thick border around the cells (and the conditional formatting within Excel only has thin borders)

In the final function, there will be 9 combinations of formatting {Red, Amber, Green} interior with {Red, Amber, Green} thick borders.

The formatting is determined by a number in another cell (the "target" cell), which returns a value 0,...,8

I've only got as far as filling in the interior for the first combination, but the function returns an error "Application-defined or object-defined error".

VB:
Function VBA000_003_SetRAG(strTargetRange As String) 'strTargetRange is the reference for the target cell that contains the value 0,...,8

On Error Goto handler [code]....

There is not a problem with the target range, if I remove the two lines relating to rngCaller then the function works OKExecuting the rngCaller.Interior.Color = RGB(255, 0, 0) command through the Immediates window works OKI've tried calling a subroutine & passing the range across

Same errorChanging the range in the subroutine to an absolute range (eg. Sheet1.range("A1")) also causes the

same errorExecuting the subroutine on its own (with the absolute range) works OK

So my guess is that it's a bug/limitation with Excel VBA when trying to execute commands from inside a user function

View 3 Replies View Related

Convert Combination Of Excel Functions Into One User-defined Function

Mar 12, 2014

I have a really long function which counts the number of unique values in a selected range, and ignores blank cells. The function is like this (only works as an array function):

{=SUM(IF(FREQUENCY(IF(LEN(A1:A15)>0,MATCH(A1:A15,A1:A15,0),""),IF(LEN(A1:A15)>0,MATCH(A1:A15,A1:A15,0),""))>0,1))}

I want to convert this into a user-defined function COUNTUNIQUE, which only takes one argument: the range (A1:A15 in the above example)

View 6 Replies View Related

To Access Non-native Menu Commands In VBA

Jan 2, 2009

I have not been able to find any references to anywhere, so here I am....

I'm using Excel 2003 that has a menu bar added by another program that interfaces with it (via DDE, as I understand it). The DLL's from the other program have no documentation and/or ability for me to connect to the particular drop-down menu command I'm using. It is a refresh command that re-imports stock market trade data because DDE drops trade messages.

View 11 Replies View Related

Efficiency Of Custom Functions (UDF) Compared To Standard/Native Formulas

Sep 30, 2006

Assume I have a sheet consisting of 50 rows with 3 columns of figures. A fourth column contains a formula to calculate values, eg A1+B1+C1, on each line/row. I could enter A1+B1+C1 in the first cell and Copy, Paste to the other 49 cells. Alternatively, I replace A1+B1+C1 with a UDF.

Is there any difference in performance with using a UDF compared to using the long-hand/standard approach, or is it just a question of convenience? After all, both are doing the same operation with the same calculation.

View 5 Replies View Related

Making Excel File Accessible For Few Users But One User Should Not See Other User Entries

Jul 11, 2012

I have an excel file with multiple sheets. I want my HR team to update that file, but one user shouldnt see the entries of other users. I want to make a consolidated file out of three files. This excel template is for salary input.

View 3 Replies View Related

Prevent User From Accessing The Excel File When It Is In Use By Another User

Jul 22, 2013

An Excel file named CLEARING is availble in thr central server system. it will be accessed by 5 or 6 staffs from some other systems what i need is when one person accesses/edits this file the others should not even able to open in the read only file ,when the file is saved and closed ,then only the next person should access it

View 1 Replies View Related

User Defined Function Function Tooltip

Oct 9, 2007

when you type in a builtin function in the formula bar such as =DAY(), a small callout box appears below telling you the syntax - in this case "DAY(serial_number)". Is it possible to achieve this for a user defined function?

View 9 Replies View Related

VBA / Excel - Identify Columns With More Than One Value?

Apr 9, 2014

I have a macro-routine that generates a table of all sheet-headers (+/- 100-120 sheets) in a workbook. It's crusial that all headers - row("1:1") - have the same values in respektiv columns -so I have this routine to check that this really is the case, before new prosess. The table is rather huge - so I should som way or another identify the columns with more than one value (f.ex back-ground-color in column-top-cell). In this case I must edit and correct the header, and run my routine once again - until all headers are the same

Table is plased in Sheetc("HeaderCheck")

My routine works, but I dont know how to fix this mark-up stuff.

View 3 Replies View Related

Identify Junk Characters In Excel?

Aug 12, 2013

I have a DB2 table imported to Excel which has some junk characters in some of its columns. This is a huge file and I need to identify which are the junk characters exist in this file. Is there a way to find this in excel or by using any other tool?

View 8 Replies View Related

VBA Syntax To Identify Last Row And Last Column In Excel Sheet?

Apr 12, 2014

Macros and Often I find it challenging to locate the last row and/or column on my worksheet.

Any specific syntax, command or function I need to use?

View 1 Replies View Related

Excel 2007 :: Identify Duplicates Within Same Cell?

Mar 30, 2012

I use excel 2007 and need a formula to identify cells that have duplicate values within the same cell. For example, some of my city fields have the city twice, like baltimorebaltimore.

View 6 Replies View Related

Excel 2003 :: Identify All Sheets Related To One Sheet

Oct 13, 2011

I have been given an excel model to review;the workbook has 53 sheets. I would like to know if there is a way to create a flowchart/matrix with the relation of all the sheets. I would like at least to get a list of all the sheets related to each sheet. All what I was able to do is to get all the sheet names in one sheet. (I am using Excel 2003).

View 2 Replies View Related

Excel 2010 :: Identify Range Of Dates For Given Date?

Jul 26, 2012

I've gotten the desired result in Column B, but this will not work going forward as we add to the table in columns E:G .

I'm looking to search between columns E:F, Identify the date-range where my dates in column A belong, and pull the corresponding rate from column G into column B.

Excel 2010
A
B
C
D

[Code]...

View 8 Replies View Related

Uniquely Identify Cells In Excel Sheet Programmatically

Dec 19, 2013

So I have a bunch of not so simple excel sheets in a Excel file. I'm trying to automate the testing of these (right now, I'm doing the testing manually).

To simplify, let's say there are two sheets - both of them have a cell called "Total" at the end, which is nothing much a total of some column. My test is to check if these two totals are the same. We don't know the number of rows before hand (it is coming from a database). The way I'm doing right now, is searching for the cell containing the text "Total" getting it's row and column, and adding 1 to the column, to get the cell that actually has the total value. Do this for both the sheets, and I have both values, and it's easy to compare now.

If someone changes the text from "Total" to "Totals" then this will fail.

Questions:

1. Is there a better way to do this? Say, setting a unique parameter or something on the cell that actually has the total value, and using that unique parameter to search the cell?

2. Or is there a totally different (better) approach to this type of testing?

View 6 Replies View Related

Excel 2003 :: Identify Difference In Text In Cells

Feb 10, 2014

I am running a text comparison between customer names in 2 systems and although I can identify where they dont match I would like a bit more information as to what the differences may be:

See below sample data - 1 system may have Mr/Ms and middle initials whereas the other simply has the name is it possible to write a formula that will look at the cell and when it does not match identify the extra characters. Or if it totally doesnt match then just state incorrect.

A

System 1
System 2
Desired Result

Anne Duffy
Anne Duffy
OK

[Code] ...........

View 9 Replies View Related

Conditional Formatting IF Function To Identify Past Due Items In Red And Items Completed

Aug 13, 2014

I have a spreadsheet that lists a set of actions and the days they need to be completed.

The due dates are listed in column c and in column h I have a the user choosing "completed" from a drop down data validation.

I have a dashboard on a separate worksheet, showing if the item is complete and the due date.

Ideally I would like to display the dates on the dashboard in red if they are past due, and the box in column h was not marked complete.

I have been going through my books and trying to solve this, but I run into a different issues.

Even if for now If I can get the main worksheet to display the color conditional formatting that would work

View 2 Replies View Related

Create User Defined Function With IF And AND

Jul 14, 2014

I am trying to create a function using the functions of IF and "And", but for any reason I don't know how to add the Add function

My function written in excel will looks like =IF(AND(A80="00",C80<>"8300"),"yes","no")

LOB Cost Center
00 1000
00 2000
00 8300
01 5000
02 8300

Function Allocation(LOB As Integer, CostCenter as Integer) As String
If LOB = 00 And CostCenter <> 8300 Then
Allocation = "Yes"
ElseIf LOB = 1, 2, 3, 4, 5 Then
Allocation = "No"

End If

End Function

View 3 Replies View Related

>>> Sound User Function Not Working

Oct 22, 2007

I attempted to create a user function as per the link that VBA Noob posted in this post http://www.excelforum.com/excel-worksheet-functions/619446-resolved-play-a-sound-when-a-cell-equals-a-certain-value.html

I get #Name error. I placed the wav file Applause.wav in the same folder as the workbook. What did I do wrong?. Also, assuming I get this problem sorted out, how would I represent the condition "pass" or "fail" as in cell B3 in the Alarm formula? Would it be; Alarm(B3,"Pass") or Alarm(B3,"=Pass") or something else?

View 5 Replies View Related

User Defined Function Description

Nov 25, 2008

I have created a custom add-in with custom functions and am trying to make it user friendly for other users. By running the following macro I can add functions to different categories, but I was wondering if there was a way to do this automatically so that anyone that adds this add-in will have the functions show up in the proper category without having to manually run this macro.

View 6 Replies View Related

Baffling UDF User Defined Function #Name?

Nov 4, 2009

I can't get a simple function to work. I attached a screen shot of my function. It's very simple -- adds two numbers.

View 4 Replies View Related

How To Use Sum In Writing User Defined Function

May 2, 2013

I am trying to write a function which return the difference of sum of range A and sum or range B. But I keep getting error with my codes.

Code:
Function deltaPipeline(YTDPplComm As Range, LastYearPpln As Range)

deltaPipeline = Sum(YTDPplComm) - Sum(LastYearPpln)

End Function

View 1 Replies View Related

User Defined Function In Another Module

Nov 21, 2007

I am stepping through a sub in module one that for some reason keeps jumping to a user defined function in another module. I've checked and and the function isn't being called.

View 9 Replies View Related

User Defined Function - Colorize

Jun 13, 2006

I'm coding an UDF.

The main thing is, that if in the choosen cell are a specify value, than in another cell the interior color should change.

I don't know how can I change the interior color in function.

The code, buit it's not working:

Function Alerting(rCell As Range, tCell As Range)

If rCell.Value >= 5 Then

Alerting = " alert"
Cells(tCell.Row, tCell.Column).Interior.ColorIndex = 3

End If

End Function

View 3 Replies View Related

Using Add-in For User Defined Function - Speed

Oct 24, 2006

I just hit F5 and use it in Excel with no problem. This time a person who developed the function had me install it as Add-In. I do not know if it is supposed to give any advantages (versus simply typing function in VBE window + activating it by hitting F5 key), but the function works extremely slowly. Is this Add-In

View 6 Replies View Related

Create User Input For LARGE Function

May 18, 2009

I want to create a user input for a "LARGE" function so that I can then return the specified # of "large" items. i.e. user wants to get the top X number of users, user then enters number either into a dialog box or cell, code then looks at the number and populates a range of cells based on the input value. The current code that I am using simply refers to an existing table (r9:r30) that I then used the auto fill to copy to cells below it.

=INDEX(Sheet2!B$20:B$961,MATCH((LARGE(Sheet2!$F$20:$F$961,$R9)),Sheet2!$F$20:$F$961,0))

I really want to be able to just get a user dialog box going that will automatically populate both the range r9:rx (where X is the user input) and then also copy the above formula into the x number of cells below it.

View 2 Replies View Related

Using Array Constants In User-defined In Vba Function

Oct 1, 2009

I have a function in VBA of the type. Function MyFunc(Indx As Integer, k As Long, Rho As Range, A As Range) As Variant .... End Function

which is called as a user-defined function from within the Excel worksheet. When called with the last two arguments being a range (i.e. Result = MyFunc(1,98,A1:A2, B1:B2)) it works fine. However, when I try to directly use an array constant instead of a range (i.e. Result = MyFunc(1,98,{10,11}, {20,30}), it returns a #VALUE error.

I thought I could fix it by redefining the last two arguments as arrays of type double, but this didn't work either (i.e. Function MyFunc(Indx As Integer, k As Long, Rho() As Double, A() As Double) As Variant .... End Function ).

View 3 Replies View Related

User Defined Function In Different Workbooks / Addins

Jun 6, 2012

I created an addin that puts a formula in a cell to make use of a UDF in the addin. It works fine.

But when I make changes to my addin, save it as new name, load the new addin (same as the old but with new code for other things) and then open the workbook that had the UDF working, it now changes from

=customUDFfunction(1,2,3)
to
='C:Documents and SettingshomeuserApplication DataMicrosoftAddInsAddinV123.xla'!customUDFfunction(1,2,3)

The code I'm using to create the formula in the cell is

Cells(x, y).Formula = "=customUDFfunction(1,2,3)"

I'm assuming that when I create the formula in the cell it gets tagged somehow with the addin name and location. How to just put the formula with keeping it specific to the addin that created it?

View 3 Replies View Related







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