Results 1 to 4 of 4

VBA Formula function

Threaded View

jeskit VBA Formula function 05-31-2011, 04:53 AM
royUK Re: VBA Formula function 05-31-2011, 05:16 AM
jeskit Re: VBA Formula function 05-31-2011, 05:30 AM
jeskit Re: VBA Formula function 05-31-2011, 06:06 AM
  1. #1
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    VBA Formula function

    Hi

    I have a loop which loops though a cell range which consists of forumlas within the cells. I am using the forumla function as below. However instead of putting the fourmla within the cell location it puts either 0 or #DIV/0 or #VALUE

    NRow = 2
    For Each Cell In PPFWBSht.Range("AF4:AU3000")
        If Cell.Value <> "" Then
            If Cell.Interior.Color = RGB(217, 217, 217) Or Cell.Interior.Color = RGB(255, 255, 0) Then
                PPCWBSht.Cells(NRow, 1).Value = PPFWBSht.Range(Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", Cell.Column - 26, 1) & Cell.Row).Value
                PPCWBSht.Cells(NRow, 10).Value = PPFWBSht.Range(Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", Cell.Column - 26, 1) & Cell.Row).Value
    
                PPCWBSht.Cells(NRow, 11).Value = Cell.Address
                PPCWBSht.Cells(NRow, 12).Value = Cell.Formula            PPCWBSht.Cells(NRow, 12).Select
              
                NRow = NRow + 1
                              
                Application.StatusBar = Cell.Address
                
            End If
        End If
    Next Cell
    Does anyone know why it is not inserting the forumla?

    Thanks

    Jeskit
    Last edited by jeskit; 05-31-2011 at 06:08 AM.

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