ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Field value from Function. (https://www.excelbanter.com/excel-programming/337463-field-value-function.html)

Craig & Co.

Field value from Function.
 
Hi,

I can get the value of a field from with the function
=CONCATENATE("$M","$"&VALUE(MONTH(A6)))

Result is $M$8

However if I try to add this to another function
=((B6*$B$2)/365)*CONCATENATE("$M","$"&VALUE(MONTH(A6)))

I get the error #VALUE!

If I type
=((B6*$B$2)/365)*$M$8
Then I get the correct results.

I cannot find a solution in Excel Help, so I thought I'd visit the experts

Cheers
Craig.



Dave Peterson

Field value from Function.
 
Try:

=indirect("M"&MONTH(A6))





"Craig & Co." wrote:

Hi,

I can get the value of a field from with the function
=CONCATENATE("$M","$"&VALUE(MONTH(A6)))

Result is $M$8

However if I try to add this to another function
=((B6*$B$2)/365)*CONCATENATE("$M","$"&VALUE(MONTH(A6)))

I get the error #VALUE!

If I type
=((B6*$B$2)/365)*$M$8
Then I get the correct results.

I cannot find a solution in Excel Help, so I thought I'd visit the experts

Cheers
Craig.


--

Dave Peterson

Craig & Co.

Field value from Function.
 
Perfect!!!!!

Thank you!!
Craig.

"Dave Peterson" wrote in message
...
Try:

=indirect("M"&MONTH(A6))





"Craig & Co." wrote:

Hi,

I can get the value of a field from with the function
=CONCATENATE("$M","$"&VALUE(MONTH(A6)))

Result is $M$8

However if I try to add this to another function
=((B6*$B$2)/365)*CONCATENATE("$M","$"&VALUE(MONTH(A6)))

I get the error #VALUE!

If I type
=((B6*$B$2)/365)*$M$8
Then I get the correct results.

I cannot find a solution in Excel Help, so I thought I'd visit the

experts

Cheers
Craig.


--

Dave Peterson





All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com