Why can't I get it to start at "I6"?

S.H.A.D.O.

Well-known Member
Joined
Sep 6, 2005
Messages
1,915
Good evening,

I would like the data range to start at cell "I6" but for some reason what I have tried will not allow me do do this, I know it is probably me being a bit slow, it has been a VERY long week so far.

Code:
    Dim ColData As Integer
    Dim x As Integer
    ColData = Sheets("Calculation").Range("I6" & Rows.Count).End(xlUp).Row: x = 9

Thanks in advance,
 
Thanks again Rick,

Basically, in the sheet Calculation I have hundreds of rows that contain data for different products. If a product is to be used, the user inputs a quantity into column I. When they have finished they goto the sheet Customer Quotation, which is where the code I posted is run via a Macro button. The Macro then copies and pastes ONLY the rows that have a value greater than 0 into the sheet Customer Quotation. The only problem is, that there are values in cells I1:I5 in the sheet Calculation that if there are no values in column I it copies them to the sheet Customer Quotation instead of ignoring them.

Thanks in advance.
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I was not 100% sure of the cells to start at... my guess was to look from Row 6 on down in the Calculation sheet and put the copied rows on the Customer sheet starting at row 9 (I have highlighted these values in case you need to find them in order to change them). With that said, give this macro a try...
Code:
Sub MoveDataWithQuantityFromCalculationToCustomerSheet()
  Sheets("Calculation").Range("I[B][COLOR="#FF0000"]6[/COLOR][/B]", Sheets("Calculation").Cells(Rows.Count, "I"). _
    End(xlUp)).SpecialCells(xlConstants).EntireRow.Copy Sheets("Customer").Range("A[B][COLOR="#FF0000"]9[/COLOR][/B]")
End Sub
 
Upvote 0
Hi Rick,

It is still including data in cells I1:I5 in the "Calculation" sheet, although I actually changed the sheet name to "Customer Quotation" which it is.
 
Upvote 0
Hi Rick,

It is still including data in cells I1:I5 in the "Calculation" sheet, although I actually changed the sheet name to "Customer Quotation" which it is.
It does not do that for me and, given the code I posted, I really do not see how it could. Are you sure you don't have some leftover code from some previous attempts?
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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