How to - Test value 38 cols to the right for 0

MartinL

Well-known Member
Joined
Oct 16, 2008
Messages
1,141
Office Version
  1. 365
Platform
  1. Windows
How can I ammend this so it tests the value of the cell 38 cols to the right for 0.

i.e.
cell C80 needs to be tested alongside AN80 if AN80 = 0 then forget the test

This can be by -1 from count or jumping out of loop and going on to next test.

This is what I have:
Rich (BB code):
For Each CSheetUID In CSheetUIDRng.Cells
    res = Application.Match(CSheetUID.Value, SalesUIDRng, 0)
      If IsError(res) And CSheetUID.Value <> "" **And Xn > 0** Then
            'no match
            count1 = count1 + 1
            CSheetUID.Select
            ActiveCell.Interior.ColorIndex = 6
      ElseIf CSheetUID.Value <> "" **And Xn > 0** Then
            count2 = count2 + 1
        End If
Next CSheetUID

Martin
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,832
Messages
6,121,847
Members
449,051
Latest member
excelquestion515

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