Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Really Easy But having a mental Blank

How do you return the range of the active cell in a messagebox? (i.e. if A1
is selected it returns A1)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Really Easy But having a mental Blank

MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox? (i.e. if

A1
is selected it returns A1)




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Really Easy But having a mental Blank

Chears Mangesh - That was proving very difficult to find.

"Mangesh Yadav" wrote in message
...
MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox? (i.e. if

A1
is selected it returns A1)






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Really Easy But having a mental Blank

well, it does happen to me too sometimes :)

Mangesh



"Andibevan" wrote in message
...
Chears Mangesh - That was proving very difficult to find.

"Mangesh Yadav" wrote in message
...
MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox? (i.e.

if
A1
is selected it returns A1)








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Really Easy But having a mental Blank


"Mangesh Yadav" wrote in message
...
well, it does happen to me too sometimes :)


.... sometimes, I wish it were only sometimes :-)




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Really Easy But having a mental Blank

:)

Mangesh


"Bob Phillips" wrote in message
...

"Mangesh Yadav" wrote in message
...
well, it does happen to me too sometimes :)


... sometimes, I wish it were only sometimes :-)




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Really Easy But having a mental Blank

or MsgBox Activecell.Address(False,False) to get A1 style.

--

HTH

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


"Mangesh Yadav" wrote in message
...
MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox? (i.e. if

A1
is selected it returns A1)






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Really Easy But having a mental Blank

Thanks Bob - I was just about to ask exactly that as my app needs non-an
absolute reference

"Bob Phillips" wrote in message
...
or MsgBox Activecell.Address(False,False) to get A1 style.

--

HTH

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


"Mangesh Yadav" wrote in message
...
MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox? (i.e.

if
A1
is selected it returns A1)








  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Really Easy But having a mental Blank

Have just had a closer look and I am off the mark for what I want to do.

Is it possible for a UDF to return the address or column of the cell which
it is in. This isn't actually what I need to do but I can manage all the
other parts.

Essentially I have a huge SUMPRODUCT formula which uses multiple If
statement and I would find it much easier to put all the coding in a UDF.
If the UDF new which cell it was running in, I would not have any need for
any locations for variables to be included.

Thanks

Andi

"Andibevan" wrote in message
...
Thanks Bob - I was just about to ask exactly that as my app needs non-an
absolute reference

"Bob Phillips" wrote in message
...
or MsgBox Activecell.Address(False,False) to get A1 style.

--

HTH

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


"Mangesh Yadav" wrote in message
...
MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox?

(i.e.
if
A1
is selected it returns A1)










  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Really Easy But having a mental Blank

I am not absolutely sure what you want Andi, but a UDF would simply be

Function myAddress()
myAddress = Application.Caller.Address(False, False)
End Function

but this will only work as a worksheet function, so I can't quite see it's
value.

From within a function, you can get a cell's row and/or column number with

rng.Row (.Column)

where rng is any range object, such as Selection, Activecell, or
Range("A1").

Perhaps if you give a bit more detail I can be more helpful.


--

HTH

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


"Andibevan" wrote in message
...
Have just had a closer look and I am off the mark for what I want to do.

Is it possible for a UDF to return the address or column of the cell which
it is in. This isn't actually what I need to do but I can manage all the
other parts.

Essentially I have a huge SUMPRODUCT formula which uses multiple If
statement and I would find it much easier to put all the coding in a UDF.
If the UDF new which cell it was running in, I would not have any need for
any locations for variables to be included.

Thanks

Andi

"Andibevan" wrote in message
...
Thanks Bob - I was just about to ask exactly that as my app needs non-an
absolute reference

"Bob Phillips" wrote in message
...
or MsgBox Activecell.Address(False,False) to get A1 style.

--

HTH

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


"Mangesh Yadav" wrote in message
...
MsgBox ActiveCell.Address

Mangesh



"Andibevan" wrote in message
...
How do you return the range of the active cell in a messagebox?

(i.e.
if
A1
is selected it returns A1)














Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need mental help!! hi Excel Discussion (Misc queries) 0 March 4th 09 10:54 AM
mental block Lost in excel Excel Worksheet Functions 3 January 14th 07 08:18 PM
Is there a easy way to delete blank lines to clean up worksheets? jdf5 Excel Worksheet Functions 2 June 4th 06 06:05 PM
Mental block Jack Sheet New Users to Excel 3 March 22nd 06 08:31 PM
Mental Block! - Event Change Conditional Formatting [email protected] Excel Programming 3 May 24th 05 01:35 PM


All times are GMT +1. The time now is 01:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"