Configure Autoformat Settings

%3CLINGO-SUB%20id%3D%22lingo-sub-2259794%22%20slang%3D%22en-US%22%3EConfigure%20Autoformat%20Settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2259794%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20having%20trouble%20with%20the%20autoformat%20feature%20in%20Excel%20and%20I%20wanted%20to%20make%20sure%20if%20this%20is%20even%20a%20feature.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20the%20XLOOKUP%20function%20in%20a%20formula.%20This%20formula%20first%20looks%20at%20the%20data%20in%20the%20cell%20to%20its%20left%2C%20checks%20to%20see%20if%20there%20is%20a%20match%20in%20a%20table%2C%20and%20if%20there%20is%2C%20it%20sends%20the%20data%20of%20the%20cell%20to%20its%20left%20from%20the%20table.%20This%20formula%20operates%20in%20a%20column%20of%20cells.%20How%20do%20I%20get%20the%20autoformat%20to%20change%20the%20cell%20to%20its%20left%20(going%20down%20one%20row%20each%20time)%20without%20modifying%20the%20range%20that%20it%20looks%20for%20in%20the%20table%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20instance.%3C%2FP%3E%3CP%3EXLOOKUP(G3%2CB3%3AB8%2CC3%3AC8)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I'm%20asking%20for%20is%20a%20way%20for%20the%20first%20part%20of%20the%20function%20(G3)%20to%20be%20autoformated%2C%20without%20it%20affecting%20the%20rest.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2259794%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2259805%22%20slang%3D%22en-US%22%3ERe%3A%20Configure%20Autoformat%20Settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2259805%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1019832%22%20target%3D%22_blank%22%3E%40MrSandMan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20%22fix%22%20a%20cell%20reference%2C%20place%20%24%20before%20the%20column%20letter%20and%20row%20number%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DXLOOKUP(G3%2C%24B%243%3A%24B%248%2C%24C%243%3A%24C%248)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20official%20terminology%20is%20that%20the%20reference%20G3%20is%20%3CEM%3Erelative%3C%2FEM%3E%2C%20i.e.%20changeable%2C%20while%20%24B%243%3A%24B%248%20and%20%24C%243%3A%24C%248%20are%20%3CEM%3Eabsolute%3C%2FEM%3E%2C%20i.e.%20static.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I am having trouble with the autoformat feature in Excel and I wanted to make sure if this is even a feature.

 

I am using the XLOOKUP function in a formula. This formula first looks at the data in the cell to its left, checks to see if there is a match in a table, and if there is, it sends the data of the cell to its left from the table. This formula operates in a column of cells. How do I get the autoformat to change the cell to its left (going down one row each time) without modifying the range that it looks for in the table?

 

For instance.

XLOOKUP(G3,B3:B8,C3:C8)

 

What I'm asking for is a way for the first part of the function (G3) to be autoformated, without it affecting the rest.

3 Replies

@MrSandMan 

To "fix" a cell reference, place $ before the column letter and row number:

 

=XLOOKUP(G3,$B$3:$B$8,$C$3:$C$8)

 

The official terminology is that the reference G3 is relative, i.e. changeable, while $B$3:$B$8 and $C$3:$C$8 are absolute, i.e. static.

@MrSandMan 

Some further thoughts.  If you are using XLOOKUP you will be using Excel 365.  That has dynamic array functionality that makes you far less dependent on the concept of relative referencing than you would be if you were tied to tradition Excel.

 

The idea of relative referencing is that it is easy to create a set of formulas that apply to each record in a list or, similarly, each element of an array, by using fill down.  The user may have little idea even of what an array is but still be able to access their 'numbers'.  With the coming of Excel 365, it is now practical to work almost entirely with arrays defined by absolute referencing.  In your example you could write the formula

= XLOOKUP($G$3:$G$5, $B$3:$B$8, $C$3:$C$8)

in a single cell ($H$3 say) and the result would occupy the 3-cell range $H$3:$H$5.

 

Better still, is to hide the grotesque direct referencing and use named ranges

= XLOOKUP(lookup_value, lookup_array, return_array)

[names specific to your business domain would be better again]

If you use Excel Tables to store source data, the column headers provide a default set of names for the data fields without further effort on behalf of the user and these ranges adjust to match the input data.

Thank you!