ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   I am looking for a imple formula for excel i need Cloumn be to be (https://www.excelbanter.com/excel-discussion-misc-queries/123180-i-am-looking-imple-formula-excel-i-need-cloumn.html)

help

I am looking for a imple formula for excel i need Cloumn be to be
 
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number


RichardSchollar

I am looking for a imple formula for excel i need Cloumn be to be
 
Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



help

I am looking for a imple formula for excel i need Cloumn be to
 
Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number




Gord Dibben

I am looking for a imple formula for excel i need Cloumn be to be
 
One time operation.

Enter the number in an empty cell, not in column B

Copy then select column B and EditPaste Special(in place)MultiplyOKEsc

Clear the cell with the number.

Ongoing operation a with changing number.

Enter a number in an unused cell(say D1)

In a helper column(say C) enter =B1*$D$1

Note the $ signs.

Double-click on C1 to copy down.


Gord Dibben MS Excel MVP


On Tue, 19 Dec 2006 13:46:00 -0800, help wrote:

Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



Gord Dibben

I am looking for a imple formula for excel i need Cloumn be to
 
You would need event code to have that happen without formulas or helper cells.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Enter a number in column B and it gets multiplied by 1.131

No formulas or helper cells.


Gord Dibben MS Excel MVP


On Tue, 19 Dec 2006 14:08:01 -0800, help wrote:

Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number





Dave Peterson

I am looking for a imple formula for excel i need Cloumn be to
 
There would be a problem with the .enableevents setting if two cells got
changed:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
Application.EnableEvents = False
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

Gord Dibben wrote:

You would need event code to have that happen without formulas or helper cells.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Enter a number in column B and it gets multiplied by 1.131

No formulas or helper cells.

Gord Dibben MS Excel MVP

On Tue, 19 Dec 2006 14:08:01 -0800, help wrote:

Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



--

Dave Peterson

Gord Dibben

I am looking for a imple formula for excel i need Cloumn be to
 
Thanks Dave

Not sure I understand, but will play with the revision to see why enablevents =
false should be omitted.

Gord

On Tue, 19 Dec 2006 18:03:03 -0600, Dave Peterson
wrote:

There would be a problem with the .enableevents setting if two cells got
changed:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
Application.EnableEvents = False
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

Gord Dibben wrote:

You would need event code to have that happen without formulas or helper cells.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Enter a number in column B and it gets multiplied by 1.131

No formulas or helper cells.

Gord Dibben MS Excel MVP

On Tue, 19 Dec 2006 14:08:01 -0800, help wrote:

Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



Gord Dibben MS Excel MVP

Dave Peterson

I am looking for a imple formula for excel i need Cloumn be to
 
I didn't omit it. I move it down to right before the change
(.value = .value * 1.131)

In your original code:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

You turn off the events right away.

If there are two cells that are changed (target.count 1), you exit the sub
without changing .enableevents back to true.

Same thing with the isnumeric() test.

You could have changed "exit sub" to "goto endit:" in both spots, but moving
that line was easier.



Gord Dibben wrote:

Thanks Dave

Not sure I understand, but will play with the revision to see why enablevents =
false should be omitted.

Gord

On Tue, 19 Dec 2006 18:03:03 -0600, Dave Peterson
wrote:

There would be a problem with the .enableevents setting if two cells got
changed:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
Application.EnableEvents = False
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

Gord Dibben wrote:

You would need event code to have that happen without formulas or helper cells.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Enter a number in column B and it gets multiplied by 1.131

No formulas or helper cells.

Gord Dibben MS Excel MVP

On Tue, 19 Dec 2006 14:08:01 -0800, help wrote:

Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



Gord Dibben MS Excel MVP


--

Dave Peterson

Gord Dibben

I am looking for a imple formula for excel i need Cloumn be to
 
Ah so.........the lights just went on!!

Surely I should stick to being a ToolsOptions guy.

Thanks again


On Wed, 20 Dec 2006 11:03:26 -0600, Dave Peterson
wrote:

I didn't omit it. I move it down to right before the change
(.value = .value * 1.131)

In your original code:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

You turn off the events right away.

If there are two cells that are changed (target.count 1), you exit the sub
without changing .enableevents back to true.

Same thing with the isnumeric() test.

You could have changed "exit sub" to "goto endit:" in both spots, but moving
that line was easier.



Gord Dibben wrote:

Thanks Dave

Not sure I understand, but will play with the revision to see why enablevents =
false should be omitted.

Gord

On Tue, 19 Dec 2006 18:03:03 -0600, Dave Peterson
wrote:

There would be a problem with the .enableevents setting if two cells got
changed:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
Application.EnableEvents = False
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

Gord Dibben wrote:

You would need event code to have that happen without formulas or helper cells.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo endit
Application.EnableEvents = False
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Target.Cells.Column = 2 Then
With Target
.Value = .Value * 1.131
End With
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Enter a number in column B and it gets multiplied by 1.131

No formulas or helper cells.

Gord Dibben MS Excel MVP

On Tue, 19 Dec 2006 14:08:01 -0800, help wrote:

Hi no I had tried those two ways, but I know t here is a way I remeber
learning, i need wahtever number i enter into column B to always mutlpy by
1.131 and I need the cell to only showw the answer of the calculation


"RichardSchollar" wrote:

Hi

Two ways come to mind: type whatver multiple number in a cell, and copy
the cell and select column B and go EditPasteSpecialMultiply, or use
the following formaula in an adjacent column and copy down:

=B1*number

replace number with whatever.

Hope this helps!

Richard


help wrote:
Hi there, my brain has gone to mush but i need my column B to be mulitplied
by the same number



Gord Dibben MS Excel MVP


Gord Dibben MS Excel MVP

Dave Peterson

I am looking for a imple formula for excel i need Cloumn be to
 
<vbg

Gord Dibben wrote:

Ah so.........the lights just went on!!

Surely I should stick to being a ToolsOptions guy.

Thanks again

<<snipped, <<vvbg


All times are GMT +1. The time now is 12:38 AM.

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