Hi, I'm a noob here
I have 3 rather large worksheets I am working with in a workbook (actually there are around 60 worksheets).
Worksheet 1 has a range from C35:C1534.
Let's say I have a numeric value in 35 of those cells.
Worksheet 2 uses formulas (in cells J7:J1506 and K7:K1506) to look at the values of cells C35:C1534 on Worksheet 1. Let's say we are looking for the value "1".
On Worksheet 2 I have defined a maximum number of entries with the value "1" per column (let's say that maximum number is "24")
If data with the value "1" is entered into more than 25 cells on Worksheet 1 in column C (which in our case is true) it splits that data on Worksheet 2 (where we start at row 7), putting roughly half the data (18 cells of data) in column A in cells J7:J25, and the remaining data into Column K (17 cells of data) in cells K26:K43; this leaves cells J26:J1506, and cells K1:K18 and K44:K1506 on Worksheet 2 "empty".
I am using VBA to copy the data for columns J7:J1506 and K7:K1506 onto Worksheet 3 in Columns B7:J1506 and C7:K1506.
I've explained all of that to say this- On Workbook 3, I want all data to start in their columns (B and C in our example) at row 7, filling down. When I copy and paste the data from Worksheet 2 to Worksheet 3, it always brings in some form of blank cell data from Workbook 2 to Workbook 3. I can remove this blank data by manually selecting (for example) from C7 to C25, and using ClearContents. I could do this, but in actuality, I have data all the way to column QR (like I said, it's a large workbook), and so this becomes very tedious and time consuming, so naturally I want VBA to do this. I know that the problem is caused when I copy in the range of data from Workbook 2 to Workbook 3 (it brings in blank cell data) because I can clear the cell contents of Workbook 3 and all is good, but as soon as I copy the data in from Workbook 2, the blank cell data comes in also . I have tried everything I can think of, and it still brings in blank cell data. I use Range("B7:B1506").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
So using PasteSpecial (as shown above) it should be pasting nothing into Worksheet 3 but values (perhaps it is selecting null "" values?) and Skipping Blanks, but the problem persists. My secondary issue is that across the columns, data keeps getting pushed further and further down the sheet, so to find the cells with "real" values, by the time I get to column QR (in reality) I am having to look for data all the way down to row 1534; as you can see, this gets very time consuming, even for VBA.
Please help, and TIA
Bookmarks