Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
I have a spreadsheet in which column b refers to the number of years of safe
driving. ie "22 years". How do I add 1 to each cell in column B? |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
If you literally wrote "22 years" into a single cell, the manipulation needed
is: =LEFT(B2,FIND(" ",B2)-1)+1&" years" -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "diana" wrote: I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
I didn't use quotation marks. it's just 22 years
"Luke M" wrote: If you literally wrote "22 years" into a single cell, the manipulation needed is: =LEFT(B2,FIND(" ",B2)-1)+1&" years" -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "diana" wrote: I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#4
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
A formula approach
=LEFT(J5,FIND(" ",J5)-1)+1& " years" -- Don Guillett Microsoft MVP Excel SalesAid Software "diana" wrote in message ... I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#5
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
Sorry, I should have made that clearer. The real question was to confirm that
you were combining the value (22) with text (years) into the same cell. (which you are) The formula I gave you will take the value from the cell, add 1 to it, then add on the text string. Simply place it into an empy column and copy down as needed. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "diana" wrote: I didn't use quotation marks. it's just 22 years "Luke M" wrote: If you literally wrote "22 years" into a single cell, the manipulation needed is: =LEFT(B2,FIND(" ",B2)-1)+1&" years" -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "diana" wrote: I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#6
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
No, I didn't use quotation marks and I need to change column b for each row
in my spreadsheet. "Luke M" wrote: If you literally wrote "22 years" into a single cell, the manipulation needed is: =LEFT(B2,FIND(" ",B2)-1)+1&" years" -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "diana" wrote: I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#7
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
A macro solution
Sub addnumbertotext() '=LEFT(J5,FIND(" ",J5)-1)+1& " years" For Each c In Range("b2:b22") 'Selection c.Value = Left(c, InStr(c, " ") - 1) + 1 & " years" Next c End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Don Guillett" wrote in message ... A formula approach =LEFT(J5,FIND(" ",J5)-1)+1& " years" -- Don Guillett Microsoft MVP Excel SalesAid Software "diana" wrote in message ... I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#8
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
Assuming the cells in the range contain either whole numbers or, if floating
point numbers are used, the decimal point for the system is a "dot", then this statement... c.Value = Left(c, InStr(c, " ") - 1) + 1 & " years" can be replaced with this slightly simpler one... c.Value = Val(c.Value) + 1 & " years" -- Rick (MVP - Excel) "Don Guillett" wrote in message ... A macro solution Sub addnumbertotext() '=LEFT(J5,FIND(" ",J5)-1)+1& " years" For Each c In Range("b2:b22") 'Selection c.Value = Left(c, InStr(c, " ") - 1) + 1 & " years" Next c End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Don Guillett" wrote in message ... A formula approach =LEFT(J5,FIND(" ",J5)-1)+1& " years" -- Don Guillett Microsoft MVP Excel SalesAid Software "diana" wrote in message ... I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? |
#9
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How do I add 1 to a number in column b
Instead of putting the string " years" in each cell, couldn't you just add it to
the column header--then everyone will know that field is. If you like that idea, you could remove the " years" from each cell by: Selecting the range Edit|replace (xl2003 menus) what: _years (where _ means space character) with: (leave blank) replace all ========== If you don't like that idea, you could still remove the string from each cell, but then give the column a custom format: Format|cells|number tab|custom category #0" years" Then the value will still be numeric (for further calculations), but the cell will look pretty. diana wrote: I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inverse of the column function? i.e. input a number, output thecorresponding column text label | Excel Worksheet Functions | |||
How do I turn excel columns from column number to column letter? | Setting up and Configuration of Excel | |||
Count number of cells and total in one column, based on another column suffix | Excel Worksheet Functions | |||
Display missing Part Number if Column A does not match column B | Excel Worksheet Functions | |||
Auto number w/ different letter-number combos in same column | Excel Worksheet Functions |