Hi,
I am looking to copy multiple cells by a specific number. In the formula found below it finds A1 and copies it by B1. I am looking for it to look at A1,B1,C1 and copy the amount in D1. Could anyone please assist in this?(I know it is probably simple and I am not see it).
I have found this link which helped with the formula. Linkl
Formula used:
Sub CopyData()
'Update 20140724
Dim Rng As Range
Dim InputRng As Range, OutRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
Set OutRng = OutRng.Range("A1")
For Each Rng In InputRng.Rows
xValue = Rng.Range("A1").Value
xNum = Rng.Range("B1").Value
OutRng.Resize(xNum, 1).Value = xValue
Set OutRng = OutRng.Offset(xNum, 0)
Next
End Sub
Thank you in advance for your help.
Bookmarks