How to get multiple cells to multiply different figures

Shesmi130

New Member
Joined
Nov 1, 2017
Messages
7
I have used the formula below to get a specific set of cells to produce a multiplied figure, however it will only work for one row. Each time I change the details in the formula to include another row it deletes the info that was added for the previous row. Is there a way to use the formula on multiple rows that have different values? For example, I need C3:I3 to multiply by 10 but I need C5:I5 to multiply by 18.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H10" '<== change to suit
Const SET_VALUE As Long = 23 '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then

With Target

If IsNumeric(.Value) Then .Value = .Value * SET_VALUE
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub
 
Hi! Can you help me in creating a drop down list that can select multiple options. I got a code that can select multiple options but it is separated with comma. My client wants it separate in different cell under the same column. Please I need some help with this. Thank you in advance.
Please do not post your unrelated questions to someone else's threads! That is known as "thread hijacking". Please post your question to its own thread.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top