Finding Specified Values on each Row

Grothgar101

New Member
Joined
Feb 8, 2018
Messages
3
Hi All;

I have a range of data, in this case columns K to AJ. I have an unspecified number of rows (which is fine, I can use vba to delineate the final row number) and I want to find the first 0 (from Column K) and then do some things once I find that 0.

Now, in the past, I've done some things with finding numbers in just one column, such as the below.

Code:
For i = 4 To LR
    With Range("I" & i)
        If .Value <> "" Then
        .Copy Destination:=Sheets("Summary").Range("B" & Rows.Count).End(xlUp).Offset(1)
        .Offset(5, -4).Copy Destination:=Sheets("Summary").Range("F" & Rows.Count).End(xlUp).Offset(1)
        .Offset(0, -3).Copy Destination:=Sheets("Summary").Range("O" & Rows.Count).End(xlUp).Offset(1)
        .Offset(0, -5).Copy Destination:=Sheets("Summary").Range("P" & Rows.Count).End(xlUp).Offset(1)
        .Offset(1, -5).Copy Destination:=Sheets("Summary").Range("Q" & Rows.Count).End(xlUp).Offset(1)
        .Offset(1, -3).Copy Destination:=Sheets("Summary").Range("R" & Rows.Count).End(xlUp).Offset(1)
        .Offset(0, -2).Copy Destination:=Sheets("Summary").Range("S" & Rows.Count).End(xlUp).Offset(1)

But, I really can't figure out a way to get my search to do something on one row, find the 0 and then do things (using Offset etc), and then pop to the next row.

Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Maybe I can make it a little clearer.

I've got data on a row, from Column K to AJ. The data is either a 1 or a 0. I want to find the first 0 (starting from Column K) in that row. I will then write some code that put's in various numbers into cells on that row based on where the 0 is located.

I then want the code to go down to the next row and do it all again :)
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

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