简体   繁体   English

将Excel中的多列转换为具有唯一值的1列

[英]Turn multiple columns in excel into 1 column with unique value

I have a list of questions as series of columns in excel with around 10,000 rows. 我有一个问题列表,这些列是excel中具有大约10,000行的一系列列。 Yes or No is denoted by a 0 or 1 and only 1 question can be selected for any give row. 是或否用0或1表示,任何给定行只能选择1个问题。 What I'd like to do is take all these columns and merge them into 1 column where the value of each question is assign to a number instead. 我想做的是将所有这些列合并为1列,其中每个问题的值都分配给一个数字。 So for instance I have: 例如,我有:

   Q1            Q2         Q3           Q4           Q5 
   0             1          0            0            0  
   0             0          0            1            0  
   0             0          1            0            0  
   0             1          0            0            0  
   1             0          0            0            0        

So instead I'd like to assign each question to a value like 因此,我想将每个问题分配给一个类似的值

Q1 = 1 Q2 = 2 Q3 = 3 Q4 = 4 Q5 = 5 Q1 = 1 Q2 = 2 Q3 = 3 Q4 = 4 Q5 = 5

and them merge it into one column like: 然后将它们合并为一列,例如:

Questions
    2
    4
    3
    1 

Is there a decently simple way to accomplish this? 有没有一种很简单的方法可以做到这一点?

Use the Match function: 使用匹配功能:

=MATCH(1,B2:F2,0)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel计数唯一值多个列 - Excel Count unique value multiple columns 使用唯一标识符将多列合并为一列 - EXCEL - Consolidating Multiple Columns into one column with a unique identifier - EXCEL 具有多列的Excel中的唯一值 - Unique values in excel with multiple columns 与多张纸上的多列比较时,excel函数可突出显示一列中的唯一值 - excel function to highlight unique values in one column when compared with multiple columns on multiple sheets Excel:如果该行中有值MULTIPLE列,则以文本形式提取列标题 - Excel: pulling in column headings as text if there is a value in that row, MULTIPLE columns Excel:在多个列中查找值并返回标题列 - Excel: Find value across multiple columns and return header column Excel公式在两列中搜索一列中的唯一值,在另一列中搜索固定值 - Excel formula to search two columns for unique value in one column and fixed value in another Excel Pivot 表 - 将具有相同值的两列转换为矩阵 pivot 表,列名作为行,值在列中计数 - Excel Pivot Table - Turn two columns with same values into a matrix pivot table with column names as rows and value count in columns 计算Excel中多个列中唯一组合的数量 - Count the quantity of unique combinations in multiple columns in Excel 计算Excel中多列的唯一值 - Counting Unique Values for Multiple Columns in Excel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM