Thursday, May 6, 2021

Fieldvalue function

You can use the FIELDVALUE function to retrieve field data from linked data types like the Stocks or Geography data types. There are easier methods for writing formulas that reference data types, so the FIELDVALUE function should be used mainly for creating conditional calculations based on linked data types.

Note: March 28, 2019: Data types have been released to all Windows Microsoft 365 subscribers. If you are a Microsoft 365 subscriber, make sure you have the latest version of Office.

Technical details

Syntax

=FIELDVALUE(value, field_name)

The FIELDVALUE function syntax has the following arguments:

Argument

Description

value

Function returns all matching fields(s) from the linked data type specified in the value argument.

field_name

The name or names of the fields you would like to extract from the linked data type.

Description

Examples

In the following basic example, the formula =FIELDVALUE(A2,"Price") extracts the Price field from the stock data type for JM Smucker Co.

Retrieve a company stock price with =FIELDVALUE(A2,"Price")

The next example is a more typical example for the FIELDVALUE function. Here we're using the IFERROR function to check for errors. If there isn't a company name in cell A2, the FIELDVALUE formula returns an error, and in that case we want to display nothing (""). But if there is a company name, we want to retrieve the Price from the data type in A2 with =IFERROR(FIELDVALUE($A2,B$1),"").

Retrieve a company stock price, and ignore errors with =IFERROR(FIELDVALUE($A2,B$1),"")

Note that the FIELDVALUE function allows you to reference worksheet cells for the field_name argument, so the above formula references cell B1 for Price instead of manually entering "Price" in the formula. 

Remarks

If you try to retrieve data from a non-existent data type field, the FIELDVALUE function will return the #FIELD! error. For instance, you might have entered "Prices", when the actual data type field is named "Price". Double-check your formula to make sure you're using a valid field name. If you want to display a list of field names for a record, select the cell for the record, and press Alt+Shift+F10.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See also

Stocks and geographic data types

How to write formulas that reference data types

#FIELD! error

4 comments:

  1. Hello Everybody,

    My name is Mr. Danish Ahmad by name and I live in the POLAND and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation get any kind of loan you need today, thank you, as you read greatest testimony of my life. with Whatsapp +60 111-722 5002

    Testimony of a serious loan acquired, thank you very much Dr. Mark for your loan assistance of 100,000(US DOLLARS) with just a registration fee,that you give me. I will talk about your services to those around me who need a loan or financing. I am happy with the loan you have granted me Do not hesitate,if you need a loan and a real legit loan lender so just kindly contact him now and get your loan via:: ronniefinancehome247@gmail.com Whatsapp number: +91 93118 56893

    Whats-App on +91 93118 56893
    Company Name Ronnie Finance Ltd
    Dr. Mark Thomas

    ReplyDelete
  2. Our company is into project funding, Loan, joint venture, Equity and we are globally willing to fund companies, Private bodies,Government bodies and we are ready to help you with any kind of financial needs. In-case you are interested with my company financial services do get back to me with Kindly get back to us: magmafincropp@gmail.com
    Whats-app us on +917428734439

    ReplyDelete
  3. Do you need a quick long or short term Loan with a relatively low interest rate as low as 3%? We offer business Loan, personal Loan, home Loan, auto Loan,student Loan, debt consolidation Loan e.t.c. no matter your credit score.

    Personal Loans (Secure and Unsecured)
    Business Loans (Secure and Unsecured)
    Consolidation Loan and many more.

    Contact US for more information about Loan offer and we will solve your financial problem. contact us via email: magmafincropp@gmail.com Whats-app us on +917428734439

    ReplyDelete

  4. I must testify that your article is out standing.most of the articles I come across these days do not really provide anything that attracts others as yours, but believe me the way you interact is literally awesome I do respect that so much. I will instantly get your link and stay informed of any updates you make and as well take the advantage to share some vital information regarding the different steps which can be use to join the top class of people in the world. HOW TO JOIN and be in control of wealth and fame

    ReplyDelete