ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   x = 1 (https://www.excelbanter.com/new-users-excel/199359-x-%3D-1-a.html)

Bryan De-Lara

x = 1
 
Hi all, I am fairly new to excel. I want to put x's into a column and make
each x = 1 then do a count further down. Then in the next column put an x to
= 2 then do another count and so on in more columns increasing the value of
x. I cannot seem to get anything to work. I've tried to put into a cell x=1
and so on but it doesn't work. Any help would be appreciated.

Bryan.


ExcelBanter AI

Answer: x = 1
 
Hi Bryan,

I'd be happy to help you with this Excel question. It sounds like you want to create a table with a column of X's and then count the number of X's in each column as you increase the value of X. Here's how you can do it:
  1. Start by typing "X" into the first cell of your first column. Let's say this is cell A1.
  2. In the cell next to it (B1), type the number 1.
  3. In the cell below A1, type the formula
    Formula:

    "=IF(A1="X",1,0)" 

    . This formula will check if the cell above it (A1) contains an X. If it does, it will return a value of 1. If it doesn't, it will return a value of 0.
  4. Copy the formula in cell B2 and paste it into the cells below it in column B. This will count the number of X's in column A for each value of X in column B.
  5. In cell C1, type the number 2.
  6. In the cell below A1, type the formula
    Formula:

    "=IF(A1="X",1,0)*C$1" 

    . This formula will check if the cell above it (A1) contains an X. If it does, it will return a value of 1 multiplied by the value in cell C1. If it doesn't, it will return a value of 0.
  7. Copy the formula in cell C2 and paste it into the cells below it in column C. This will count the number of X's in column A for each value of X in column C.
  8. Repeat steps 5-7 for as many columns as you need.

Gordon[_6_]

x = 1
 
"Bryan De-Lara" wrote in message
...
Hi all, I am fairly new to excel. I want to put x's into a column and make
each x = 1 then do a count further down. Then in the next column put an x
to = 2 then do another count and so on in more columns increasing the
value of x. I cannot seem to get anything to work. I've tried to put into
a cell x=1 and so on but it doesn't work. Any help would be appreciated.

Bryan.


I'm a bit confused as to what you want to do. (And why?)
In Excel (as with all spreadsheet applications), a cell can either be text,
as in "x" or a number, as in "1".


Sandy Mann

x = 1
 
With x's in Column A,

==COUNTA(A1:A25)

will cound *any* entry in the cells.


=COUNTIF(A1:A25,"x")

will count only the x's

In Column B use:

=COUNTIF(B1:B25,"x")*2

will count each x as equal to 2

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Bryan De-Lara" wrote in message
...
Hi all, I am fairly new to excel. I want to put x's into a column and make
each x = 1 then do a count further down. Then in the next column put an x
to = 2 then do another count and so on in more columns increasing the
value of x. I cannot seem to get anything to work. I've tried to put into
a cell x=1 and so on but it doesn't work. Any help would be appreciated.

Bryan.




Bryan De-Lara

x = 1
 
Thanks Sandy, just what I needed.
Gordon, it is 5 columns that has x's in rather than ticks. The headers
for the columns are 1 to 5. My boss didn't want numeric entered into the
cells which would have been easy to sum total. So I needed x to = 1 and so
on.
Thanks for the reply.

Bryan.
"Sandy Mann" wrote in message
...
With x's in Column A,

==COUNTA(A1:A25)

will cound *any* entry in the cells.


=COUNTIF(A1:A25,"x")

will count only the x's

In Column B use:

=COUNTIF(B1:B25,"x")*2

will count each x as equal to 2

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Bryan De-Lara" wrote in message
...
Hi all, I am fairly new to excel. I want to put x's into a column and
make each x = 1 then do a count further down. Then in the next column put
an x to = 2 then do another count and so on in more columns increasing
the value of x. I cannot seem to get anything to work. I've tried to put
into a cell x=1 and so on but it doesn't work. Any help would be
appreciated.

Bryan.





Sandy Mann

x = 1
 
You are very welcome.

As I read in another post some time ago:
"there is nothing more dangerous than a manager with a spreadsheet" <g

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Bryan De-Lara" wrote in message
...
Thanks Sandy, just what I needed.
Gordon, it is 5 columns that has x's in rather than ticks. The headers
for the columns are 1 to 5. My boss didn't want numeric entered into the
cells which would have been easy to sum total. So I needed x to = 1 and so
on.
Thanks for the reply.

Bryan.
"Sandy Mann" wrote in message
...
With x's in Column A,

==COUNTA(A1:A25)

will cound *any* entry in the cells.


=COUNTIF(A1:A25,"x")

will count only the x's

In Column B use:

=COUNTIF(B1:B25,"x")*2

will count each x as equal to 2

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Bryan De-Lara" wrote in message
...
Hi all, I am fairly new to excel. I want to put x's into a column and
make each x = 1 then do a count further down. Then in the next column
put an x to = 2 then do another count and so on in more columns
increasing the value of x. I cannot seem to get anything to work. I've
tried to put into a cell x=1 and so on but it doesn't work. Any help
would be appreciated.

Bryan.









All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com