Excel, replace an "X" with a "1"

fifou69 Posted messages 88 Status Member -  
fifou69 Posted messages 88 Status Member -
Hello,

You may say, your title strangely resembles a bunch of questions entitled "Convert letters to numbers or vice versa."

That's true! But on my side, my problem remains... a problem!

So, on one side I have 5 columns with heating choices (electricity, natural gas, fuel oil, etc.). On the other hand, I have 2500 rows with apartments... However, the person who gave me this Excel file marked their choices with "X" and that bothers me when calculating the totals for each (How many apartments use natural gas, for example)!

I can’t add up "X" marks, so I would like to replace them with "1". But doing this on 2500 rows would require courage worthy of Aragorn...

Is this possible? If so, can someone help me?

Thank you for your help!

Florian

Configuration: Windows XP / Internet Explorer 7.0

7 answers

Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 146
 
Hello,

It is possible to change the X to 1, but it is also possible to keep the file as it is and count the X's

example in the range from A1 to A300 with this formula

=COUNTIF(A1:A300, "x")
--
A+
Mike-31

A period of failure is a perfect time to sow the seeds of knowledge.
7
dobo69 Posted messages 1593 Registration date   Status Member Last intervention   835
 
Good evening,

1) replace "X" with 1:
Edition -> replace -> X in 'search' and 1 in 'replace'....
'replace all'

2) count X in a column B (for example)
=COUNTIF(B:B,"X") or: =COUNTIF(B2:B2500,"X") ....
--
If you need anything, just ask me.
3
Pacorabanix Posted messages 4122 Registration date   Status Member Last intervention   663
 
Good evening,
I think that with the function =COUNTIF(range, "X") you have what you're looking for.

This will give you the number of "x" or "X" that are found in the specified range of cells.
0
gbinforme Posted messages 14930 Registration date   Status Contributor Last intervention   4 744
 
Hello

You can sum the number of X with SUMPRODUCT.

You can put 1 instead of X using the "replace" function (ctrl + h) after selecting your range, and just check "entire cell" and click "replace all".
--

Always zen
0
dobo69 Posted messages 1593 Registration date   Status Member Last intervention   835
 
Good evening everyone!
Well fifou you can say thank you... :-D
3 replies in 2 minutes...
--
If you need anything, just ask me.
0
Pacorabanix Posted messages 4122 Registration date   Status Member Last intervention   663
 
Yeah, 4 in fact, I was tripping too lol.
0
dobo69 Posted messages 1593 Registration date   Status Member Last intervention   835
 
4 !!!
but what concern on this forum...
0
dobo69 Posted messages 1593 Registration date   Status Member Last intervention   835
 
I must say it was really complicated and it's good for the neurons to be working at full capacity at this time...
0
Pacorabanix Posted messages 4122 Registration date   Status Member Last intervention   663
 
well, he's polite, he's clear, and he doesn't make any mistakes in French, that's so rare... everyone wants to get their hands on him ;)
0
dobo69 Posted messages 1593 Registration date   Status Member Last intervention   835
 
Yes, and he explained his problem very well too...
0
Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 146
 
Yes, but he is not following his discussion
--
A+
Mike-31

A period of failure is a perfect time to sow the seeds of knowledge.
0
fifou69 Posted messages 88 Status Member
 
Yes, yes!!

Sorry for the delay, it's just that I'm in Canada so I'm dealing with a 6-hour time difference...

Indeed, I greatly appreciate your help! Fast and efficient!
0