+ Reply to Thread
Results 1 to 8 of 8

Problems with Range

Hybrid View

  1. #1
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Problems with Range

    So you just need to code for multiple cells.

    Should each row in the target range have a formula applied?

    What is the proper formula?
    Cheers
    Andy
    www.andypope.info

  2. #2
    Registered User
    Join Date
    01-26-2009
    Location
    Hanko, Finland
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Problems with Range

    Quote Originally Posted by Andy Pope View Post
    So you just need to code for multiple cells.

    Should each row in the target range have a formula applied?

    What is the proper formula?
    Yes for every row where number gets added.

    Formula is:

    =IF(A303="";"";PIBVSearch(2;"server";"";"";"";"";"*-200 day";"";"";"S.0";256;PIBVUnitBatchSearchMasks(TEXT(A303;0);"";"";"";"")))
    Where A303 is cell that got changed. Ultimately I will be wanting to change "*-200 day" to be date which is dependant on row above this which is why I'm going macro way(can't figure way to get it working by adding formula to cell itself. I can put date there but how to get it calculate from date above).

    Result will be date and time.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Problems with Range

    So something more like this.

    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim rngCell As Range
        
        If Target.Column = 1 Then
            For Each rngCell In Target.Cells
                If rngCell.Value <> "" Then
                    ThisWorkbook.Sheets("gg").Cells(rngCell.Row, 2).Formula = "=1"
                End If
            Next
        End If
        
    End Sub
    Change the formula to your formula with user defined functions.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1