Forum Discussion
Need a wildcard for cell row reference.?
Sorry for the lack of knowledge and bad coding. I am building a customer database, sales tracking, inventory managing spreadsheet (Yeah I know). I am looking to clean up the code to auto populate the number in CUSTOMER!D#, CUSTOMER!N#, The D2 I am testing is a drop down list of customer names. Is there a way to say if value in D2(DROP DOWN LIST) is bob(CUSTOMER!D3) then provide bob's fixed info(CUSTOMER!N3). Obviously, I can hand code every customer, 3 through infinity, I ever get but their has got to be a simpler way. Please correct my lack of knowledge.
=SWITCH(D2, CUSTOMER!D3, CUSTOMER!$N3, CUSTOMER!D4, CUSTOMER!$N4, CUSTOMER!D5, CUSTOMER!$N5, CUSTOMER!D6, CUSTOMER!$N6, 0)
- SWITCH is a good swap for IF/IFS to simplify logic. It seems like you have a lot more data. Have you considered using XLOOKUP?
3 Replies
- Patrick2788Silver ContributorSWITCH is a good swap for IF/IFS to simplify logic. It seems like you have a lot more data. Have you considered using XLOOKUP?
- E_Sean_SullivanCopper Contributor
Patrick2788 You are a steel-eyed missile man. Its exactly what I needed. Thank you for the education.
- Patrick2788Silver ContributorYou're welcome!