Multiplying a Text Value

  • Hi,


    I am currently working on a spreadsheet and have hit a brief stumbling point. I guess what I`m trying to do is =sum(b1*(text(a1,"")) - which doesn't work (needless to say)


    which should multiply my text value as follows


    chair 3 chair chair chair
    table 2 table table
    cushion 3 cushion cushion cushion


    Can any of you experts lend a hand??


    Many thanks


    Mark

  • Re: Multiplying a Text Value


    Hi Mark,


    Are you trying to put the word chair in cells C1, D1 and E1 if there is the number 3 in cell B1?


    If so, then probably VBA code would be better for that than formulas.


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim i As Integer
        If Not Intersect(Target, Range("B1:B1000")) Is Nothing Then
            For i = 1 To Target.Value
                Target.Offset(0, i).Value = Target.Offset(0, -1).Value
            Next i
        End If
    End Sub


    Regards,


    Bill

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!