Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

62%
+3 −1
Q&A How to pivot text?

Perhaps (if a process of several relatively familiar steps is easy to remember) but additional formulae may be appropriate, a little extension to the source data required and some formatting. Howev...

posted 3y ago by pnuts‭  ·  last activity 3y ago by Alexei‭

Answer
#3: Post undeleted by user avatar Alexei‭ · 2021-05-30T07:41:16Z (almost 3 years ago)
#2: Post deleted by user avatar pnuts‭ · 2021-05-24T06:41:28Z (almost 3 years ago)
#1: Initial revision by user avatar pnuts‭ · 2020-10-19T16:20:15Z (over 3 years ago)
*Perhaps* (if a process of several relatively familiar steps is easy to remember) but additional formulae may be appropriate, a little extension to the source data required and some formatting. However, the offered solution only works for at most three states (here `YES`, `NO`, and `X`).

First, add the required additional data. This is the trigger for the `X`s, so perhaps a formula in A7 and copied across to B7 of:

    =unique($A2:$A7)

Enter `0` in ColumnD of each of the rows populated by the [UNIQUE](https://support.google.com/docs/answer/3093198) formula.
In D2 and copied down (say by double-clicking the fill handle):

    =IF(C2="YES",1,-1)

Then in say F2:

    =query(A2:D10,"select A, sum(D) group by A pivot B")

Finally for presentation purposes select from ColumnF and to the right and Format > Number > More Formats > Custom number format and:

    "YES";"NO";"X"

and <kbd>Apply</kbd>.

![Inputs and output](https://software.codidact.com/uploads/BKSgo4fJtudJYQaPtpg1BF39)

This is extensible for more people (possibly most easily by inserting rows at the position of the UNIQUE formula) but would then require additional population of ColumnD and extending the [Query](https://developers.google.com/chart/interactive/docs/querylanguage) range.

The process would be much simpler if a fill (could be applied with Conditional Formatting) was allowed instead of the `X`s and would be easier to extend if a blank row were allowed in the pivot table under its headings.