get cell of function

Hi

Can I somehow determine, in which column (A,B,C,...) a selfmade function 
is called?
Or: Can I tell the function, placed f.e. in cell C1, to loop through the 
column left (in this example B) of it?

thanks lot for help
materphilch
0
11/5/2005 4:34:01 PM
excel 39879 articles. 2 followers. Follow

2 Replies
761 Views

Similar Articles

[PageSpeed] 11

Dim rng as Range
set rng = Application.Caller

to see the value:

MsgBox(rng.address)


Gary's Student


"masterphilch" wrote:

> Hi
> 
> Can I somehow determine, in which column (A,B,C,...) a selfmade function 
> is called?
> Or: Can I tell the function, placed f.e. in cell C1, to loop through the 
> column left (in this example B) of it?
> 
> thanks lot for help
> materphilch
> 
0
GarysStudent (1572)
11/5/2005 5:24:03 PM
As answered in .programming

Application.Caller.Address

will get the calling cell address.

The second part could be done with

    For Each cell In
Range(Application.Caller.Address).Offset(0,-1).EntireColumn
        'do stuff on cell
    Next cell


-- 

HTH

RP
(remove nothere from the email address if mailing direct)


"masterphilch" <masterphilch@gmx.net> wrote in message
news:dkimtr$14s$1@news.hispeed.ch...
> Hi
>
> Can I somehow determine, in which column (A,B,C,...) a selfmade function
> is called?
> Or: Can I tell the function, placed f.e. in cell C1, to loop through the
> column left (in this example B) of it?
>
> thanks lot for help
> materphilch


0
bob.phillips1 (6510)
11/5/2005 5:26:50 PM
Reply:

Similar Artilces:

How to get picture in PowerPoint2007?
Hello ,Everyone In PowerPoint 2007,use vsto How to get Slide background picutre? And,if the Slide use Layout or Master how to get background picutre? if a shape is fill with picutre,How to get the picture? I try to use Export method,but is not apply to rotated PictureShape and the shape filled with picture, the picture file quality is poor. Another,How to get gradiant color from background,I always get same color from GradiantStops property. Thank you. ...

Linking Formats Across Cells
anyone know if I can link formats across cells? For example, if I fill a cell with a color, can I link it to another cell that will do the same ? thanks. Try the FormatPainter, the little PaintBrush icon up in the tool bar...........click on your colored cell, then click on the icon, then click and drag on the cells you want to be the same........... Vaya con Dios, Chuck, CABGx3 "RB" <RB@discussions.microsoft.com> wrote in message news:FE8ABE47-2671-447C-8CC6-2D784EEECE00@microsoft.com... > anyone know if I can link formats across cells? For example, if I fill a cell ...

How do I connect cell color to bar chart color?
I have seen an excel spread sheet bar chart where the colors of the bars were connected to the color of the cell. I was not able to determine how that was accomplished and the author of the spread sheet no longer works for the company that sent me the data. Does anyone know how this can be done? Hi Bob, It's possible this was done using a vba macro. For a non VBA approach have a look at Jon's examples of conditional charts. http://peltiertech.com/Excel/Charts/ConditionalChart1.html Cheers Andy Bob Freerks wrote: > I have seen an excel spread sheet bar chart where the color...

about function keys
This is a multi-part message in MIME format. ------=_NextPart_000_0149_01CA656F.25EEE970 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I went out a got a new keyboard. guess what? the function keys don't work on the new one. could this be anything with windows 7 by any chance????? bonnie ------=_NextPart_000_0149_01CA656F.25EEE970 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HT...

Speech Function
Can the speech function be added to Excel version 9.0.2719? Or is it already there? Speech was added in xl2002. You may want to look for a third part voice recognition program. Gayle wrote: > > Can the speech function be added to Excel version 9.0.2719? Or is it already > there? -- Dave Peterson ec35720@msn.com ...

Better Return Function
1. When Recall Transaction For Return, instead of bringing up everything that was purchased in return mode ( and having to delete the ones not being return), there should be an option to make the POS to ask the user to scan/enter the item to be return. Then the program has to check that the item scanned does exists in that transaction. 2. Returned item from that transaction should not be allowed to be return again. 3. In Recall Transaction For Return mode, have the ability to block user from giving credit/cash back to customer. 4. In Recall Transaction For Return mode, do not pref...

Get Computer Listing
I don't know if this is the correct forum, but I'm creating a remote installation program using VB.NET 2005 and am looking for a really fast way to scan the computers in my domain and create a listing them in a treeview. Is there a way to grab the computer information in the domain and display it quickly from a central workstation programmatically in VB.net? Thanks On Feb 1, 4:29=A0pm, Sean Winfield <swinfi...@cinci.rr.com> wrote: > I don't know if this is the correct forum, but I'm creating a remote > installation program using VB.NET 2005 and am looki...

Getting a LockMatchID error using sp_rename
When I'm trying to rename a table in the tempdb table, I'm getting an error when I run it in a stored procedure or code, but it works ok on MSSMS. I get the error: Invalid EXECUTE statement using object "Object", method "LockMatchID". EXEC sp_rename 'Tempdb.dbo.oldFile' , 'newFile' Don't ask me why I have to mess with the tempdb files (This is probably the problem). But I have old legacy code that writes to the tempdb database. On Jul 14, 10:00=A0am, Cindy Lee <danparker...@yahoo.com> wrote: > When I'm trying to renam...

Is there a way to protect just one cell, not the whole sheet?
The books I read seem to indicate so, but say you first must turn on the 'Protect Sheet' option. When I do that, everything is protected. Any help much appreciated. Hi try the following: - first select all cells you don't want to protect - goto 'Format - Cells - Protection' and uncheck 'Locked' - now protect your sheet -- Regards Frank Kabel Frankfurt, Germany "Fred Exley" <fexly221@msn.com> schrieb im Newsbeitrag news:10hsd5t42ghdt65@corp.supernews.com... > The books I read seem to indicate so, but say you first must turn on the > &...

VBA Function Reference
Is there a good VBA reference manual or website? I have in mind something like the Principles of Operations manuals (for you dinosaurs who remember Assembly Language) that shows each function with the parameters and a few examples. For which Office program and version? They vary depending on version, and each program has it's own objects and methods. --JP On Mar 18, 10:31=A0am, Square Peg <Square...@Round.Hole> wrote: > Is there a good VBA reference manual or website? > > I have in mind something like the Principles of Operations manuals > (for you dinosaurs who remem...

Find function in a macro
I want to set up a macro that searches a column for a value 'X' and then selects the cell right under the cell that contains 'X'. I have been stumped on this for a few days now and would really really appreciate any sort of help or guidance. Thanks a lot! SK --- Message posted from http://www.ExcelForum.com/ Sub Findit() Dim r as Range For Each r in Range("A1:A1000") 'Or whatever yours is If r.Value = "X" Then Range("A" & r.Row+1).Select 'Change A to your column Exit For End If Next End Sub K P.S. You could probably use an...

Two different values in a single cell...
Hi, Is it possible to have two different values (coming from another sheet) in a single cell? For example, 0.87 (0.97) In that case 0.87 comes from a cell on sheet1 and 0.97 from a cell on sheet2. Thanks for the help. Patrick, Hi You can concatenate two results into one cell. This makes it inot a text cell, however, so you cannot do maths on it quite so easily. To join the info, just use the CONCATENATE function, or the & sign =A2&" " &A3 You may also need the TEXT funtion, depending on what format you want the result to be -- Andy. "Patrick" <an...

Getting started with GP10.0
So, now I've installed it, what do I do? If I open the application, I get a list of servers (means nothing to me) and a username and password box. Again, I haven't a clue what I could put in here. Is this software supposed to be for lay-people? It seems horribly complex if you're not a programmer. Where is your reseller? You need a good VAR to help you implement this product. I don't know of any product in the price range of Dynamics GP that is "super-friendly" the first time you use it. A good rule of the thumb: more functionality = more complexity. -- Japhe...

How do I get rid of this error?
Outlook 2000 I get an error after Outlook runs for a few minutes.... I ran Office repair, removed Office and reinstalled, formatted the and reinstalled the OS and apps....but I still get the error: OUTLOOK.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being generated. First of all, I don't know where the error log is....it must be a windows error log. Any ideas? Thanks. Sorry for the post....there's a kb article on this. "SAC" <sac@sac.com> wrote in message news:uYgXneUPGHA.3260@TK2MSFTNGP11...

Getting data from Access
I am trying to use the Get External Data function to pull data from an Access query however I keep getting an error that says: "Microsoft Query: msqry32.exe - Application error The instruction at 0x000000072 referenced memory at 0x000000072. Memory could not be read Click OK to Terminate Click on CANCEL to debug" I am using Excel and Access 2000. Does anyone have any idea why I keep getting this error? Check out this page http://www.rondebruin.nl/accessexcel.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "NChris" <NChris@discussions.micr...

Cannot get datagrid to display data
Hi, I have an XML file that I was hoping to use as a database Here is the code that I have copied that should display the data namespace File_Generation_System { public partial class vrholds : Form { public vrholds() { InitializeComponent(); XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml("vrdatabase.xml"); DataSet ds = new DataSet("vrdata DataSet"); ds = xmlDatadoc.DataSet; dataGridView1.DataSource = ds.DefaultViewManager; } But what I g...

text in Bullets/points in cell
How can one write the text in bullets or points in the cell in excel 2007. Hold the ALT key, then on the NUMERIC KEYPAD, type 0149, then let go of the ALT key -- you'll have your bullet •<== works here, too! "kamal" wrote: > How can one write the text in bullets or points in the cell in excel 2007. ...

Want to find max in a range then return a name from a cell
The spreadsheet has 5 people each person has a list describing thei sales performance. Each has their highest sale, highest over cost sale etc. I have a table with a describtion highest sale, highest over cost sal etc. I want the cell beside each title to calcute who has the highest figur and place their name in this cell. :confused: I have a spreadsheet with lists containing highest sale highest average sale etc. What I want to do is create a formula tha will find the max value within a list please note these values ar spread out and do not run on the spreadsheet side by side or one aft...

Excel 2003: Cell rounds 16 digit numbers- How to advoid rounding?
When I enter a 16 digit credit card number, excel rounds the last digit to 0; How do I format to reatin the exact number I entered (Have formatted cells to numbers, no decimal places now.) Hi, Format as text or precede your number with an apostrophe; it won't show up in the cell. -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Max T." wrote: > When I enter a 16 digit credit card number, excel rounds the last digit to 0; > How do...

how to add a letter in front of each number in a cell
I am working on this project & I cant figure out how to add a letter in front of each number in a cell without clicking in to each individual cell and typing it in. (very time consuming and tedious) The problem is - it's not all the cells but a majority, all of the numbers are in the same column. To explain, these are documents in storage. Each item is assigned a number (not in any particular numerical order but they have to stay in the order they are. Example: X39655 X39656 X39711 39662 39664 39665 The last three numbers need the X in front of them. Any ideas? Thanks so muc...

error in excel help. how to select a cell after clicking the Select All button?
Hello "To see all the relationships on a worksheet, in an empty cell type = (equal sign), and then click the Select All button. Select the cell, and press Trace Precedents twice." is written in Excel 2002 help. It's not possible to "Select the cell" following the procedure. Or How to "select the cell" in the procedure? begin 666 0486.gif M1TE&.#EA%0`4`)$``/___V9XI0```)D`F2'Y! ``````+ `````5`!0```)* MC(^I`>T/GP&BUHBG<'MCIW%-]VF61Z'0A%DE,[:GQU+M@ \T,T-"KFO45)P> @8/AP96"R5TI)6MIBQ$@H]I'P3EEM-UO[KA9D10$`.P`` ` end Ma...

Holiday is combing now get ready for Asian ladies
Believe or not Asian girl is so beautiful and married http://drct.me/5o ...

Stop multiple cells from being automatically selected
When I place the cursor in a cell, it selects that cell and the 3 directly below it. Why is this happening and how do I stop it? I have already exited the program and even rebooted. Thanks. hi if you are using 03 or earlier, try tapping the F8 key. this is the extended select mode. it's boolean. tap once to enter extended mode, again to exit. if you are useing 07, this is a bug. try adjusting your zoom. see this....http://tinyurl.com/3wofsf regards FSt1 "JDandLinda" wrote: > When I place the cursor in a cell, it selects that cell and the 3 directly > ...

Can't get the nulmrx project to run
I've compiled the nulmrx project using the Windows XP x86 Free Build Environment. My OS is Windows XP Pro SP3. To install, I put the nulmrxnp.dll file in C:\Windows\System and I put nulmrx.sys in the C:\Windows\System32\Drivers. Next I successfully ran : regini nulmrx.ini Next, I edited \\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder and put "NulMRx," as the first entry. Then I rebooted the machine. According to the directions then, all I have to do is call "net use * \\nulsvr\share" and it should wo...

If cell= a value then highlight a color?
Is there a way to have a cell auto highlight if it equals a value? For example if the cell says "Expired" then highlight red and if the cell equals "Expires soon" then highlight yellow. IF the cell equals "Current then no fill for that cell. The cells value is determined by an IF THEN statement. Thanks, Chance ...