Thread: [Solved] from two cell to one?
View Single Post
 
Old 01-10-2012, 03:25 AM
gsrikanth gsrikanth is offline Windows XP Office XP
Competent Performer
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default

Sub Test()
Dim rngToChange As Range
Dim iMultiplier As Integer
Dim iDivisor As Integer

With Sheets("Sheet1")

iMultiplier = .Range("A1").Value
iDivisor = .Range("A2").Value
.Range("A2").Value = iMultiplier / iDivisor
Set rngToChange = .Range("B1:B" & .Cells(Rows.Count, "B").End(xlUp).Row)

.Range("A2").Copy
rngToChange.PasteSpecial _
Paste:=xlAll, Operation:=xlMultiply, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

End With

End Sub

it will help if "/" is replace concatenate
any other no vba just do this plz

Last edited by gsrikanth; 01-10-2012 at 04:54 AM.
Reply With Quote