Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Custom Function Referancing Cell Value

Hello. I'm having a little trouble making a custom function that will show
the value of another cell. Basically what I want is a Function that will get
a Cell location from a neighboring cell and then use that value to output the
answer of that cell. I'm not sure if it makes any sence but I'll post an
example of what I'm hoping I can do.

Column F
Name 1
Name 2
Name 3

Column G
=TestDisplay(H1)

Column H1
(Now in this column I can type in F1 and the function in G will display
"Name 1")

I'm not sure if any of that helps afterall. But is there a way to do this.
When I've tried I get either #NAME or #VALUE errors.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default Custom Function Referancing Cell Value

In G1 enter =IF(H1="","",INDIRECT(H1))

"Abode" wrote:

Hello. I'm having a little trouble making a custom function that will show
the value of another cell. Basically what I want is a Function that will get
a Cell location from a neighboring cell and then use that value to output the
answer of that cell. I'm not sure if it makes any sence but I'll post an
example of what I'm hoping I can do.

Column F
Name 1
Name 2
Name 3

Column G
=TestDisplay(H1)

Column H1
(Now in this column I can type in F1 and the function in G will display
"Name 1")

I'm not sure if any of that helps afterall. But is there a way to do this.
When I've tried I get either #NAME or #VALUE errors.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Custom Function Referancing Cell Value

Thanks, That helps a lot. I kind of want to expand on it and Make it so I
dont have to type the H everytime. Is there a way that I can somehow add a H
on there and have Indirect read it.. I tried with the Numbers Tab in "Format
Cells". It always returns a #REF error and I thikn I found that even though
it reads a Cell that says H1 on there it only reads the 1.

"kassie" wrote:

In G1 enter =IF(H1="","",INDIRECT(H1))

"Abode" wrote:

Hello. I'm having a little trouble making a custom function that will show
the value of another cell. Basically what I want is a Function that will get
a Cell location from a neighboring cell and then use that value to output the
answer of that cell. I'm not sure if it makes any sence but I'll post an
example of what I'm hoping I can do.

Column F
Name 1
Name 2
Name 3

Column G
=TestDisplay(H1)

Column H1
(Now in this column I can type in F1 and the function in G will display
"Name 1")

I'm not sure if any of that helps afterall. But is there a way to do this.
When I've tried I get either #NAME or #VALUE errors.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default Custom Function Referancing Cell Value

Hi

You cannot use a number format, as a cell reference is in fact text. A
workaround would be to put the H in a seperate column, say Col I, and using
the following formula instead:

=IF(H1="","",INDIRECT(CONCATENATE(I1,H1)))

You can hide this column, or simply paint the font white to hide it, if that
is needed.

"Abode" wrote:

Thanks, That helps a lot. I kind of want to expand on it and Make it so I
dont have to type the H everytime. Is there a way that I can somehow add a H
on there and have Indirect read it.. I tried with the Numbers Tab in "Format
Cells". It always returns a #REF error and I thikn I found that even though
it reads a Cell that says H1 on there it only reads the 1.

"kassie" wrote:

In G1 enter =IF(H1="","",INDIRECT(H1))

"Abode" wrote:

Hello. I'm having a little trouble making a custom function that will show
the value of another cell. Basically what I want is a Function that will get
a Cell location from a neighboring cell and then use that value to output the
answer of that cell. I'm not sure if it makes any sence but I'll post an
example of what I'm hoping I can do.

Column F
Name 1
Name 2
Name 3

Column G
=TestDisplay(H1)

Column H1
(Now in this column I can type in F1 and the function in G will display
"Name 1")

I'm not sure if any of that helps afterall. But is there a way to do this.
When I've tried I get either #NAME or #VALUE errors.



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
When I enter =Temparary!F2 , I get a zero when referancing a blank cell Bruce Excel Worksheet Functions 4 December 3rd 06 10:49 PM
Referancing differant sheets jp nellie Excel Worksheet Functions 2 November 16th 05 09:19 PM
Need to know what cell called the custom VBA function? partyOfOne Excel Programming 1 September 19th 05 05:06 PM
Custom Function: Detecting the cell the function is used in g-boy Excel Programming 2 June 11th 05 06:46 PM
cross referancing Chris the man form socail services Excel Discussion (Misc queries) 1 December 6th 04 04:51 PM


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

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

About Us

"It's about Microsoft Excel"