Dealing with Blank Cells

rwmill9716

Active Member
Joined
May 20, 2006
Messages
485
Office Version
  1. 2013
Platform
  1. Windows
The following macro reads Cells BY6 and BZ6 to identify columns from which data will be entered in rows 8 and greater. The actual reading for these two parent columns was cut and pasted into columns CA and CB so I could follow the macros action.

The X/Y values match for rows 10 to 14, then a blank X cell (CB15) is encountered. From that point on the Y values continue to match, but the correct X values are lost (they hold the values from the prior loading of a different X code.

Is there some change to the macro code that can more effectively deal with these blank cells, i.e., copy the blank cell and continue with correct values for those following?





Sub Graph1()
Dim Found As Range
Sheets("Graph").Range("C4:C497").Copy Destination:=Sheets("Graph").Range("BZ8")

Set Found = Sheets("Graph").Rows(4).Find(what:=Sheets("Graph").Range("bY6").Value, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then Exit Sub

With Sheets("Graph")
.Range(Found, Found.End(xlDown)).Copy Destination:=Sheets("Graph").Range("BY8")
End With

End Sub







Excel 2003
BXBYBZCACB
5XY
621
7Correlation0.415625
821
9ACNin CHMDAMC in CHMDYX
10114.9375639.7178539.7178514.93756
11210.9514740.8278940.8278910.95147
12310.2419341.8064341.8064310.24193
13410.491342.6376842.6376810.4913
14510.7406843.4689243.4689210.74068
15674.1388644.1672644.16726
16782.510644.3001744.3001710.99005
17882.4414445.1314245.1314211.23943
18982.5392245.9626745.9626711.4888
191082.6124646.7939246.7939211.73818
Graph
Cell Formulas
RangeFormula
CB7=CORREL(BY10:BY501,BZ10:BZ501)
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,203,070
Messages
6,053,366
Members
444,658
Latest member
lhollingsworth

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