最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

excel - How can I pull unique values and adjacent columns of those values from one tab to another? - Stack Overflow

programmeradmin1浏览0评论

First time posting! Thanks for your patience.

I have a spreadsheet with two tabs: Donations and Constituents. Each row on the Donations tab is a transaction, so there might be multiple rows per name/anization. I'm trying to find the right formulae to do two things in the Constituents tab:

  1. Pull all unique values from the "Donor Name" column of the Donations tab
  2. Populate adjacent info like address, email, etc. but none of the transaction data

I got really close with two formulae. In cell A2 on the Constituents tab, I used:

=LOOKUP(2, 1/(COUNTIF($A$1:A1, Donations!$C$2:$C$125)=0),Donations!$C$2:$C$125)

Column C is "Donor Name" on the Donations tab. 125 is the last row on the Donations tab.

In cell B2 on the Constituents tab, I used:

=INDEX(Donations!$D$2:$L$125,MATCH(Constituents!$A2,Donations!$C$2:$C$125,0),MATCH(Constituents!B$1,Donations!$D$1:$L$1,0))&" "

Columns D–L are the constituent info columns I want to grab from the Donations tab.

The problems I'm having:

  • If I sort by column A on the Constituents tab, the data gets all jumbled so that columns B through J no longer match up with their donor names in column A. Same thing happens when I try sorting column B. Will I only ever be able to sort from the Donations tab, never the Constituents tab?
  • The formulae the way I wrote them only grab through row 125 on the Donations tab. How do I make it dynamic so that whenever I add a row to the Donations tab the constituent info (when Donor Name is a unique value) auto-populates on the Constituents tab?
  • For some odd reason I can't format the ZIP code column on the Constituents tab to format as a 5-digit ZIP code, even though it's formatted that way on the Donations tab.

Thanks in advance for the help!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论