Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do i add more to a formula without going into each cell?

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default how do i add more to a formula without going into each cell?

Hi,

you can do it by using another column like below:

A B
1 0.5845 =round(A1,2)
2 12.69585
3 15.65824
4 0.52548
..
..
..
and then copy the fomula in B1 down to where ever you want.

Thanks,


--
Farhad Hodjat


"orangie" wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do i add more to a formula without going into each cell?

Thanks. But I'd like to keep the original number in the formula, and not A1
or A2, etc.

Thanks.

"Farhad" wrote:

Hi,

you can do it by using another column like below:

A B
1 0.5845 =round(A1,2)
2 12.69585
3 15.65824
4 0.52548
.
.
.
and then copy the fomula in B1 down to where ever you want.

Thanks,


--
Farhad Hodjat


"orangie" wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default how do i add more to a formula without going into each cell?

...why?

"orangie" wrote:

Thanks. But I'd like to keep the original number in the formula, and not A1
or A2, etc.

Thanks.

"Farhad" wrote:

Hi,

you can do it by using another column like below:

A B
1 0.5845 =round(A1,2)
2 12.69585
3 15.65824
4 0.52548
.
.
.
and then copy the fomula in B1 down to where ever you want.

Thanks,


--
Farhad Hodjat


"orangie" wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do i add more to a formula without going into each cell?

for informational purposes... to keep a record of the full number.

"Toppers" wrote:

..why?

"orangie" wrote:

Thanks. But I'd like to keep the original number in the formula, and not A1
or A2, etc.

Thanks.

"Farhad" wrote:

Hi,

you can do it by using another column like below:

A B
1 0.5845 =round(A1,2)
2 12.69585
3 15.65824
4 0.52548
.
.
.
and then copy the fomula in B1 down to where ever you want.

Thanks,


--
Farhad Hodjat


"orangie" wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default how do i add more to a formula without going into each cell?

try this:

1 0.5845 ="=round("&A1&",2)"
2 12.69585
3 15.65824
4 0.52548
.
.
.

and then copy the fomula in B1 down to where ever you need
then copy and paste special value the cells that you made ( column B) in
to the another column and then active the tird column ( say column C) go to
menu: Tools Text to column and flollow instruction.

hope this works for you.

Thanks,
--
Farhad Hodjat


"orangie" wrote:

Thanks. But I'd like to keep the original number in the formula, and not A1
or A2, etc.

Thanks.

"Farhad" wrote:

Hi,

you can do it by using another column like below:

A B
1 0.5845 =round(A1,2)
2 12.69585
3 15.65824
4 0.52548
.
.
.
and then copy the fomula in B1 down to where ever you want.

Thanks,


--
Farhad Hodjat


"orangie" wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default how do i add more to a formula without going into each cell?

You cannot have a value AND formula in the same cell.

Use a helper column with =ROUND(A2,2) ... copy down ... and then Copy, Paste
Special == Values if you want to remove the formula.

HTH

"orangie" wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default how do i add more to a formula without going into each cell?

You could use a macro. Select the cells to fix and run this:

Option Explicit
Sub testme()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

orangie wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do i add more to a formula without going into each cell?

Thanks!

"Dave Peterson" wrote:

You could use a macro. Select the cells to fix and run this:

Option Explicit
Sub testme()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

orangie wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do i add more to a formula without going into each cell?

I'm trying to use this macro but am having an application, unknown object
error:

Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Formula & ",2)"
Next myCell
End Sub

Now when I try the above it gives me an application error.
But with the following code that you gave me it works great.

Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

why won't it work for a cell that is =1258/4569871 and keep the 1258/4569871
in the cell's formula of =Round(1258/4569871, 2) ???

Thanks!


"orangie" wrote:

Thanks!

"Dave Peterson" wrote:

You could use a macro. Select the cells to fix and run this:

Option Explicit
Sub testme()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

orangie wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!


--

Dave Peterson



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 301
Default how do i add more to a formula without going into each cell?

because the formula includes the "=", so you'd wind up with
=ROUND(=1258/4569871,2) and Excel doesn't like the 2nd equal sign!

"orangie" wrote in message
...
I'm trying to use this macro but am having an application, unknown object
error:

Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Formula & ",2)"
Next myCell
End Sub

Now when I try the above it gives me an application error.
But with the following code that you gave me it works great.

Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

why won't it work for a cell that is =1258/4569871 and keep the

1258/4569871
in the cell's formula of =Round(1258/4569871, 2) ???

Thanks!


"orangie" wrote:

Thanks!

"Dave Peterson" wrote:

You could use a macro. Select the cells to fix and run this:

Option Explicit
Sub testme()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

If you're new to macros, you may want to read David McRitchie's intro

at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

orangie wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a

formula to
this value in this cell, basically =round(5.62345, 2), but i have

30+ cells
with values and I don't want to go into each cell individually. is

there
anyway to avoid this?

Thanks!

--

Dave Peterson



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how do i add more to a formula without going into each cell?

orangie

Try this version which preserves the formula in the cell.

Sub RoundAdd()
Dim myStr As String
Dim cel As Range
For Each cel In Selection
If cel.HasFormula = True Then
If Not cel.Formula Like "=ROUND(*" Then
myStr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=ROUND(" & myStr & "," & "2" & ")"
End If
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Wed, 21 Mar 2007 12:45:26 -0700, orangie
wrote:

I'm trying to use this macro but am having an application, unknown object
error:

Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Formula & ",2)"
Next myCell
End Sub

Now when I try the above it gives me an application error.
But with the following code that you gave me it works great.

Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

why won't it work for a cell that is =1258/4569871 and keep the 1258/4569871
in the cell's formula of =Round(1258/4569871, 2) ???

Thanks!


"orangie" wrote:

Thanks!

"Dave Peterson" wrote:

You could use a macro. Select the cells to fix and run this:

Option Explicit
Sub testme()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

orangie wrote:

I have a value in a cell, say A2 =5.62345. And I want to add a formula to
this value in this cell, basically =round(5.62345, 2), but i have 30+ cells
with values and I don't want to go into each cell individually. is there
anyway to avoid this?

Thanks!

--

Dave Peterson


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
adding a formula in a cell but when cell = 0 cell is blank Mike T Excel Worksheet Functions 5 May 31st 05 01:08 AM
Cannot enter formula in a cell after removing a circular formula Big Corona Excel Worksheet Functions 0 April 5th 05 06:07 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 05:40 PM.

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

About Us

"It's about Microsoft Excel"