Forum Discussion
Help with Index and Match Formula - Excel 2013
I am working on a project at work which requires us to have a workbook with anywhere from 1 to 10 sheets of data. On the last sheet we have a Contract that needs to be printed and signed by our clients. The Data on the other sheets is the information from the client that needs to be on the contract.
At this point I have set up the contact to pull the information from 1 sheet onto the contract by entering the Clients name into cell G21 and then using index and match the rest of the cells auto populate. It works great.
When I went to add the rest of the sheets to the formula in the required cells I am getting the error of #VALUE!
Can anyone tell me what I have done wrong in this code?
=INDEX('Sheet 10T'!C3:C122&'Sheet 9'!C3:C72,MATCH(Contract!G21,'Sheet 10T'!B3:B122&'Sheet 9'!B3:B72,0))&""
We have Excel 2013 in my office.
I am very new to any intermediate or advance Excel functions and having been watching YT videos and reading various forms to gain insight into getting Excel to do some of the advanced for me features I would like.
capeperson In the attached I mocked up something that is working
a) I unmerged A1 on your 10 sheets and made A2 be the "ADDRESS" title and put a formula in the new A1 that will pull the sheet name (I did that so I didn't have to manually type each sheet name and if you copy the sheet or change the sheet name it auto updates, but you could manually insert the sheet name there)
b) I added a new sheet and in Col A I used a formula to collect all those sheet names. Again, you could just skip to this step and manually type all the sheet names
c) I do a match for that name on all the sheets
d) I have cells in row 1 to identify the sheet name and the corresponding row that the name is found
e) I then used an INDIRECT formula to use that sheet name (I named that cell "sName") and row ("sRow") to pull that row and the INDEX is used to pull which column has the info you want. I only did a few examples to give you an idea of how it works. I also tried to use all 'older' non-DA formulas because you mentioned you are on an older Excel.
see attached
15 Replies
- mtarlerSilver ContributorYou can't use '&' to combine ranges like that. There are different option but if it is just those 2, maybe consider nesting them with an IFERROR(LOOKUP 1st range, LOOKUP 2nd range) If it is across 10 sheets you might want to consider creating a helper sheet where you pull all the relevant data together for a single lookup range. (This is completely opposite of what @matheletes would say as it would be better to enter the data into a single entry table and then you can have the individual sheets have sub-tables or pivot tables or just have 1 sheet where you can select / slice what you want to lookup/see). If you provide a sample workbook we could certainly help more/easier.
- capepersonCopper Contributor
Thank you, I will upload a sample file.
sorry for all the edits, I uploaded a sample sheet blank and sample 2 with an entry on the forms.
- mtarlerSilver Contributor
capeperson In the attached I mocked up something that is working
a) I unmerged A1 on your 10 sheets and made A2 be the "ADDRESS" title and put a formula in the new A1 that will pull the sheet name (I did that so I didn't have to manually type each sheet name and if you copy the sheet or change the sheet name it auto updates, but you could manually insert the sheet name there)
b) I added a new sheet and in Col A I used a formula to collect all those sheet names. Again, you could just skip to this step and manually type all the sheet names
c) I do a match for that name on all the sheets
d) I have cells in row 1 to identify the sheet name and the corresponding row that the name is found
e) I then used an INDIRECT formula to use that sheet name (I named that cell "sName") and row ("sRow") to pull that row and the INDEX is used to pull which column has the info you want. I only did a few examples to give you an idea of how it works. I also tried to use all 'older' non-DA formulas because you mentioned you are on an older Excel.
see attached