简体   繁体   中英

Need help with Excel 2007 Formula - Many to many update

I'm experienced with database development, but not so much with Excel. I'm looking for help writing an Excel formula that would help my client's spreadsheet behave like a database. This is what I'm looking to do, but I can't figure out how to write it in Excel 2007:

"If Q4 (on sheet 2) contains A2 (on sheet 1), append A1 (on sheet 1) with Q5 (on sheet 2)"

Some factors:

1) This formula may find multiple instances of A2, so it should not stop after finding the first match

2) The values, as they are created in A1, should be separated with comma and space

3) This is a many to many relationship between Q4 and A2

Thanks for any help with this. I've tried vlookups, match, if statements, but they all fall short in one way or another.

Well, use SQL to query your spreadsheet.

In excel, go Data > Import External Data > New Database Query. Choose Excel Files, and you can query it with an SQL statement.

OR

Create a link table in access, and use ms access to do your queries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM