Copying empty values

robbie1974

New Member
Joined
Mar 11, 2005
Messages
6
I have a workbook with 2 worksheets. The first called import, the second input. My collegue needs to fill in one or more rows on sheet input.

On the import sheet i put in formulas to copy those values and add some more.

When i import my workbook, it is reading all the lines as records even if there is no value.

Purpose is that when I have for example 5 rows on input sheet it only import 5 rows from import sheet.

See attachment.

I don't know vba but maybe what i want can't be accomplished by standard excel?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I don't think you can do much more to stop blank rows being imported. Maybe more info about the Importing itself may help there.

One option is to delete everything in import from row 3 down and use VBA to only have the fornulas looking at the rows Inputted:

VBA Code:
Sub copytolast()

Dim ws As Worksheet
Dim ws2 As Worksheet
Dim lastrow As Long

Set ws = Sheets("Input")
Set ws2 = Sheets("Import")
lastrow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row

ws2.Range("A2:Co2").Copy ws2.Range("A" & lastrow)

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,522
Messages
6,125,312
Members
449,218
Latest member
Excel Master

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