# Count X in Survey as 1 across mulitple sheets

#### kriskerr

##### New Member
Hi folks
First time posting so be kind. Im currently trying to compile surveys into one workbook each question is marked with an x in a cell.
Im trying to create a totals page for each individual repsonse unfortunately each sheet is named by the assignee e.g john, thomas. I can get it to tally when it is via sheet numbers by using this formula.
=SUMPRODUCT(COUNTIF(INDIRECT("Sheet"&ROW(INDIRECT("1:7"))&"!C19"),"X"))
however will not let me do via names

### Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
List the names in a range of cells, let's say G2:G8, and then try...

=SUMPRODUCT(COUNTIF(INDIRECT("'"&\$G\$2:\$G\$8&"'!C19"),"X"))

Hope this helps!

List the names in a range of cells, let's say G2:G8, and then try...

=SUMPRODUCT(COUNTIF(INDIRECT("'"&\$G\$2:\$G\$8&"'!C19"),"X"))

Hope this helps!

Unfortunately not the cell is a single cell on each sheet for example john!C19+Kris!C19+Thomas!C19 etceach of these cells have an x or are blank I have a sheet named totals and trying to get it to tally the individual cell C19 across the multiple sheets.

Why not put all data on 1 worksheet (e.g. with an macro) and after that analyze your data.

Unfortunately not the cell is a single cell on each sheet for example john!C19+Kris!C19+Thomas!C19 etceach of these cells have an x or are blank I have a sheet named totals and trying to get it to tally the individual cell C19 across the multiple sheets.

Hi

It seems you did not understand Domenic's post.

You have to write the names of the sheets in a range of cells, for ex. in G2:G4 you write "John", "Kris", "Thomas" and then use Domenic's formula:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&\$G\$2:\$G\$4&"'!C19"),"X"))

If the cells contain X or are blank you could also use:

=COUNTA(John:Kris!C19)

If the cells contain X or are blank you could also use:

=COUNTA(John:Kris!C19)

I guess this is a good use for: can't see the wood for the trees.

I guess this is a good use for: can't see the wood for the trees.
I was definitely in a forest cheers worked a treat

Bill Jelen ‏@MrExcel

Andrew Poulsom shortens a 722 character #Excel COUNTIF formula to 22 characters....

Replies
1
Views
199
Replies
5
Views
300
Replies
3
Views
371
Replies
1
Views
309
Replies
3
Views
313

1,202,916
Messages
6,052,539
Members
444,591
Latest member
exceldummy774

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back