Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When I enter =Temparary!F2 , I get a zero when referancing a blank cell | Excel Worksheet Functions | |||
Referancing differant sheets | Excel Worksheet Functions | |||
Need to know what cell called the custom VBA function? | Excel Programming | |||
Custom Function: Detecting the cell the function is used in | Excel Programming | |||
cross referancing | Excel Discussion (Misc queries) |