Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
OldKenGoat
 
Posts: n/a
Default How do I increment or decrement values in a column?

I have a column of the numbers 1 and 0. In an adjacent column, I want to
increment or decrement the value by 1. I know there's a simple way to do
this, but, I can't see it! Thanks for any help, OldKenGoat
Example:
Col A Col B
0 0
1 1
1 2
1 3
0 2
1 3
1 4
0 3
0 2
0 1
0 0
1 1
1 2
0 1




  #2   Report Post  
Niek Otten
 
Posts: n/a
Default

In B2:

=B1+(IF(A2=0,-1,1))

Fill down

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"OldKenGoat" wrote in message
...
I have a column of the numbers 1 and 0. In an adjacent column, I want to
increment or decrement the value by 1. I know there's a simple way to do
this, but, I can't see it! Thanks for any help, OldKenGoat
Example:
Col A Col B
0 0
1 1
1 2
1 3
0 2
1 3
1 4
0 3
0 2
0 1
0 0
1 1
1 2
0 1






  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

B1: =A1
B2: =B1+(IF(A2=0,-1,1))

and copy B2 down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"OldKenGoat" wrote in message
...
I have a column of the numbers 1 and 0. In an adjacent column, I want to
increment or decrement the value by 1. I know there's a simple way to do
this, but, I can't see it! Thanks for any help, OldKenGoat
Example:
Col A Col B
0 0
1 1
1 2
1 3
0 2
1 3
1 4
0 3
0 2
0 1
0 0
1 1
1 2
0 1






  #4   Report Post  
OldKenGoat
 
Posts: n/a
Default

Thanks, Niek. It worked perfectly!!!

Niek Otten wrote:
In B2:

=B1+(IF(A2=0,-1,1))

Fill down


"OldKenGoat" wrote in message
...
I have a column of the numbers 1 and 0. In an adjacent column, I
want to increment or decrement the value by 1. I know there's a
simple way to do this, but, I can't see it! Thanks for any help,
OldKenGoat Example:
Col A Col B
0 0
1 1
1 2
1 3
0 2
1 3
1 4
0 3
0 2
0 1
0 0
1 1
1 2
0 1




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If column A and column B have values how do i get the total in co. reness Excel Discussion (Misc queries) 1 January 9th 05 11:38 PM
what formula do i put for column m = column k minus column l in e. jenniss Excel Discussion (Misc queries) 5 January 6th 05 08:18 PM
Putting text in a column based on variable text from another colum Jacky D. Excel Discussion (Misc queries) 1 December 16th 04 06:09 PM
PivotTable Column Field Values Michael Rekas Excel Discussion (Misc queries) 2 December 10th 04 02:18 PM
how to fit my column unmoved eventhough i scroll down? Zxing New Users to Excel 1 November 28th 04 06:28 AM


All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"