XCompany

Friday, February 16, 2024

XCompany() - Company information

Description

This function returns the company information corresponding to the selection made in the Field parameter.

Parameters

Field [Optional]

Name or code that corresponds to the information requested.

By default, when this parameter remains empty, the name of the company will be displayed.

  • Name to obtain the company name;
  • Street 1 or S1 to obtain the company first address line;
  • Street 2 or S2 to obtain the company second address line;
  • City or CT to obtain the company city;
  • Province or State or PR to obtain the company province;
  • Country or CN to obtain the company country;
  • Postal Code or Zip or PC to obtain the company postal code;
  • Phone 1 or P1 to obtain the first company phone number;
  • Phone 2 or P2 to obtain the second company phone number;
  • Fax or FX to obtain the company fax number;
  • Business no or BN or EIN to obtain the company business number;
  • Session date or SD to obtain the current session date.

To obtain the exercise beginning or ending date, you can enter:

  • Fiscal Start, Fiscal Start 0, FS or FS 0 to obtain the current fiscal year beginning date;
  • Fiscal End, Fiscal End 0, FE or FE 0 to obtain the current fiscal year ending date;
  • Last Year Fiscal Start, Fiscal Start 1, Fiscal Start -1, LYFS, FS 1 or FS -1 to obtain the last year exercise beginning date;
  • Last Year Fiscal End, Fiscal End 1, Fiscal End -1, LYFE, FE 1 or FE -1 to obtain the last year exercise ending date;
  • Fiscal Start 2, Fiscal Start -2, FS 2 or FS -2 to obtain the two years ago exercise beginning date;
  • Fiscal End 2, Fiscal End -2,FE 2 or FE -2 to obtain the two years ago exercise ending date;
  • etc.

All past exercises beginning or ending dates can be generated with this function. Specify the number of years you need to go back from the current year to Fiscal Start, FS, Fiscal End or FE parameter. Where zero (0) represents the current year, the digit one (1 or -1) represent the last year, etc. For example, if you need the information of the 5 years back from the current year:

  • Fiscal Start 5, Fiscal Start -5, FS 5 or FS -5 to obtain the beginning date of the exercise closed five years before;
  • Fiscal End 5, Fiscal End -5, FE 5 or FE -5 to obtain the ending date of the exercise closed five years before.

It is also possible to specify a year such as:

  • Fiscal Start 2007 or FS 2007 to obtain the beginning date for which the financial year finishes in 2007;
  • Fiscal End 2007 or FE 2007 to obtain the ending date for which the financial year finishes in 2007.

The following chart summarizes all possible methods to obtain the fiscal stat date. The same rules apply to obtain the fiscal end date.

The cell format, where this function is located, must be specified to obtain the desired result. In particular when you ask for a date, the cell format must be set to "Date" to see a date and not an incomprehensible number.

Connections [Optional]

Sage 50 Connection to query. If left empty, the default connection will be used.

Examples

It is strongly recommended to use Excel cells address (ex. A1:B19) containing the information of the parameters requested in all XLGL functions, such as: names or codes. This practice adds flexibility to your worksheet and will ensure the coherence of your results. Moreover, the use of quotation marks (") is essential when the parameters are manually written in the arguments function window.

Return the company name
=XCompany()
Return the company's fiscal start date
=XCompany("FS")

Was this article helpful?

 
Thank you for your feedback

Contact Can't find what you're looking for?

You can Contact us so we can address your question.