isEmpty(Cells(3, 8)) = True then not providing correct response until run 2nd time

LlebKcir

Board Regular
Joined
Oct 8, 2018
Messages
219
Code:
'=====================================
' Start Copy/Paste Values only section                  Column D -> H, Rows 3 -> 52
'=====================================
ws.Range("D3:H52").Copy                                 ' Copy the data from more stuff (Row 3) -> stuff # (Row 52)
ws.Range("D3:H52").PasteSpecial Paste:=xlPasteValues    ' Pastes value only, dropping the array created by xxxx
Application.CutCopyMode = False                         ' Clears values so not to double paste if users clicks on cell or hits Return


'=====================================
' If stuff = null fill range with FALSE
' Leave IS/M (Row 27) blank
'=====================================


' Cells(Row, Column) -> Row 3, Column 8 -> H3
If IsEmpty(Cells(3, 8)) = True Then
    ws.Range("H12:H26").Value = "FALSE"
    ws.Range("H28").Value = "FALSE"
End If

the range H12:H28 have a set of arrays that pull data from another workbook. The copy/paste special values works, but until I run the code a 2nd time, the IsEmpty is still seeing the array data and not the empty value.

Is there a better option and one that will work without having to issue the code a 2nd time?

By null I just mean no value entered into cell. Before the copy/paste section runs there is an array in all cells in row 3. After the copy/paste there should only be either a name or a blank cell. The IsEmpty does not see the blank cell the first time the code runs. However the 2nd time I run the code IsEmpty will then see the cell in row 3 as null and populate the correct "FALSE" output in the ranges indicated.

Thank you,
 
Fluffy, thank you for the reply. I will start a new thread on my next steps.

Would be nice if these forums had a means to mark a thread SOLVED or something along those lines.
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
For various reasons, we don't believe in marking threads as solved.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top