Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2021, 11:51 PM
Marcia's Avatar
Marcia Marcia is offline Fix the numerical table column headings to General or Number Format Windows 7 32bit Fix the numerical table column headings to General or Number Format Office 2013
Expert
Fix the numerical table column headings to General or Number Format
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Fix the numerical table column headings to General or Number Format

Hi. In the attached workbook, the first sheet has a formula that pulls values from the second sheet according to the set criteria through the INDEX MATCH functions. My problem is that when I converted the source data into a table, the formula returned error results. The column headings which are numbers were turned into text. I tried formatting the headings into numbers and general but still the errors remain. Typing an apostrophe before the number in the first sheet just so the errors would be eliminated is incorrect.


The temporary workaround is to exclude the column headings in the table but the data source looks ugly.
Any idea on how to straighten the column headings?
Thank you.
Attached Files
File Type: xlsx SalarySched.xlsx (33.4 KB, 7 views)
Reply With Quote
  #2  
Old 03-14-2021, 12:51 AM
Purfleet Purfleet is offline Fix the numerical table column headings to General or Number Format Windows 10 Fix the numerical table column headings to General or Number Format Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

=INDEX(Table2_Salary,MATCH([@[SALARY GRADE]],Table2_SG),MATCH([@[SALARY STEP]],Table2_Step+0))

Just add zero to the heading to make it a number

Dont know why it did it though
Attached Files
File Type: xlsx SalarySched_Purfleet.xlsx (34.0 KB, 6 views)
Reply With Quote
  #3  
Old 03-14-2021, 01:09 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Fix the numerical table column headings to General or Number Format Windows 7 64bit Fix the numerical table column headings to General or Number Format Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
  • table headings are always converted to text
  • once again, formatting has nothing to do with the underlying values, it is the way XL shows us the data
  • while building your sheets DO NOT use manual column alignment. It looks nice but hides the fact that the cell content is text or number . Apply this at the finishing stage
And the other approach would be =INDEX(Table2_Salary;MATCH([@[SALARY GRADE]];Table2_SG);MATCH([@[SALARY STEP]]&"";Table2_Step))
Reply With Quote
  #4  
Old 03-14-2021, 02:34 AM
Marcia's Avatar
Marcia Marcia is offline Fix the numerical table column headings to General or Number Format Windows 7 32bit Fix the numerical table column headings to General or Number Format Office 2013
Expert
Fix the numerical table column headings to General or Number Format
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you!
Both formulae work perfectly in my actual data where the INDEX MATCH are nested in an IF formula.
Your advice Pecoflyer is well taken and noted.
Reply With Quote
  #5  
Old 03-15-2021, 12:29 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Fix the numerical table column headings to General or Number Format Windows 7 64bit Fix the numerical table column headings to General or Number Format Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

You're welcome and thanks for the rep
Reply With Quote
  #6  
Old 03-15-2021, 07:59 AM
ArviLaanemets ArviLaanemets is offline Fix the numerical table column headings to General or Number Format Windows 8 Fix the numerical table column headings to General or Number Format Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Headers for defined Tables can't be numbers (or formulas).

And for your case, your solution is too complex!
Attached Files
File Type: xlsx SalarySchedNew.xlsx (35.9 KB, 8 views)
Reply With Quote
  #7  
Old 03-16-2021, 06:52 AM
Marcia's Avatar
Marcia Marcia is offline Fix the numerical table column headings to General or Number Format Windows 7 32bit Fix the numerical table column headings to General or Number Format Office 2013
Expert
Fix the numerical table column headings to General or Number Format
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you Arvil.
I didn't know that there is a much simpler formula to get the salary from a given matrix. i will post in a new thread a related problem.
Reply With Quote
  #8  
Old 03-16-2021, 10:14 PM
Marcia's Avatar
Marcia Marcia is offline Fix the numerical table column headings to General or Number Format Windows 7 32bit Fix the numerical table column headings to General or Number Format Office 2013
Expert
Fix the numerical table column headings to General or Number Format
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

[And for your case, your solution is too complex![/QUOTE]
Arvil may I ask about the function of the extra comma after tAnnex?
Reply With Quote
  #9  
Old 03-17-2021, 01:05 AM
ArviLaanemets ArviLaanemets is offline Fix the numerical table column headings to General or Number Format Windows 8 Fix the numerical table column headings to General or Number Format Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Quote:
Originally Posted by Marcia View Post
Arvil may I ask about the function of the extra comma after tAnnex?
I assume the question is about formula in SALARY column of Table tAnnex.

tAnnex in formula returns datarange of Table tAnnex, i.e. a range A2 : D5 in example file. NB! This range is 2-dimensional, i.e. in general it contains rows and columns.
For 2-dimensional ranges/array:
INDEX(DataRange,RowNo,ColumnNo), returns a value from single cell;
INDEX(RowNo,), returns a single row from datarange;
INDEX(,RowNo), returns a single column from datarange;

As follows, 'INDEX(tAnnex,,[@[SALARY STEP]]+1)' returns a datarange column ([@[SALARY STEP]]+1 from tAnnex, i.e. when SALARY STEP in tSalaries is 1, the column Step1 of tAnnex is returned, when SALARY STEP is 2, the column Step2 is returned, etc.
Reply With Quote
  #10  
Old 03-17-2021, 01:16 AM
Marcia's Avatar
Marcia Marcia is offline Fix the numerical table column headings to General or Number Format Windows 7 32bit Fix the numerical table column headings to General or Number Format Office 2013
Expert
Fix the numerical table column headings to General or Number Format
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

But why are there two commas in the formula?
=INDEX(tAnnex,,
I tried deleting one comma but got error result.
Reply With Quote
  #11  
Old 03-17-2021, 02:03 AM
ArviLaanemets ArviLaanemets is offline Fix the numerical table column headings to General or Number Format Windows 8 Fix the numerical table column headings to General or Number Format Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Code:
=INDEX(Range,,ColumnNo)
The formula has 3 parameters: Range, RowNo, and ColumnNo. As it must return all rows of return column, the parameter RownNo must be undetermined - what is done leaving the 2n'd parameter out, but keeping the delimiter for it present.

When you delete one of commas, you change the INDEX() formula to one with 1-dimensional range as 1st parameter.
Reply With Quote
  #12  
Old 03-17-2021, 03:45 AM
Marcia's Avatar
Marcia Marcia is offline Fix the numerical table column headings to General or Number Format Windows 7 32bit Fix the numerical table column headings to General or Number Format Office 2013
Expert
Fix the numerical table column headings to General or Number Format
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Got it but quite. Thank you for the detailed explanation Arvil.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix the numerical table column headings to General or Number Format VBA convert to table - format Column 1 Shelley Lou Word VBA 4 01-29-2021 05:44 AM
Use a numerical merge field to subtract that number of months MichaelSpedding Mail Merge 8 11-11-2015 01:11 PM
VBA to Format a Table Column in Excel Sgt Rock Excel 0 02-14-2015 02:54 PM
Fix the numerical table column headings to General or Number Format 1.image in a table 2.right click 3.menu click format 4.a format column appears OldFatDog Drawing and Graphics 1 06-13-2014 11:19 PM
Change from General Format to number format gbaker Excel 3 08-16-2013 01:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft