+ Reply to Thread
Results 1 to 2 of 2

ISEMPTY in If condition is empty not woking

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-23-2007
    Location
    chennai india
    MS-Off Ver
    2010
    Posts
    141

    ISEMPTY in If condition is empty not woking

    If Cells are empty it should take the value of above cells but it is not working. Sample file attached
    Will be greatfull for your help

    Sub Macro5()
    '
    ' Macro5 Macro
        Dim NRow1 As Long 'data sheet
        Dim CRow1 As Long 'current row
        NRow1 = Range("C" & Rows.Count).End(xlUp).Row
        Columns("A:A").Select
        Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
        CRow1 = 12
        Cells(CRow1, "A").Select
        ActiveCell.FormulaR1C1 = "=RC[1]"
        CRow1 = CRow1 + 1
        While NRow1 > CRow1
         If IsEmpty(Cells(CRow1, "B").Value) = True Then
            Cells(CRow1, "A") = (Cells(CRow1 - 1, "A"))
            
            Else
            Cells(CRow1, "A") = (Cells(CRow1, "B"))
         End If
         CRow1 = CRow1 + 1
        Wend
    Columns("A:A").Delete
        
    End Sub
    Attached Files Attached Files
    Last edited by jpbisani; 12-19-2018 at 07:39 AM. Reason: sample file not attached

  2. #2
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: ISEMPTY in If condition is empty not woking

    not sure but replace this line

    If Cells(CRow1, "B").Value = Empty Then
    Regards,
    MohanS


    "Perfection is not attainable, but if we chase perfection we can catch excellence." - Vince Lombardi

    You can simply say thanks by clicking "*Add Reputation" icon

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. UDF Not Woking Unless Commited Using Enter Again
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2015, 08:40 AM
  2. [SOLVED] =IFERROR not woking for me
    By Topher53180 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2014, 05:00 AM
  3. Replies: 1
    Last Post: 05-26-2014, 01:31 PM
  4. [SOLVED] Rank formula not woking
    By Fletch74 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2014, 10:36 PM
  5. Woking on Excel Spaces (macro)
    By foehngreen in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-17-2011, 03:29 PM
  6. IsEmpty() Returns False in empty cells
    By John Hutchins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2005, 10:07 PM
  7. woking with date's
    By 72shots in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2005, 09:06 AM

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