Extract only first "1" of the row

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Using Excel 2000

Hi,

Data In columns C:P ( Q is a result column) in the Column S:AF I want the First "1" results

I want VBA or Formula which can extract first "1" of the row CONDITION if column Q is grater than "0"

For example...
Row 7 there is no "1"
Row 8 & 9 is column Q is "0" (do not extract any "1")
Row 10 column Q is greater than "0" find "1" in the 10th position so place 1 in the 10 position in the results column S:AF, and like this continue so on....

Example data.


Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1
2
3
4
5
6P1P2P3P4P5P6P7P8P9P10P11P12P13P14ResultP1P2P3P4P5P6P7P8P9P10P11P12P13P14
7000000000000001
8111111001111100
9111111001111010
100000001001000111
11000000000000111
121000000000000011
130010000001000011
140001000100000011
15111110101110110
16111110101011110
170000011000000011
180000010100000011
190000010001000021
200000000100100011
210000000001000111
221111101110110101
231110111001111101
240100100000000011
250100000100100011
260100000100000111
270100000011000011
280100000001001011
290100000001000111
300100000000010111
311000100100000021
320011000101000021
330010010000010111
340010001100000111
35111011101011110
36111011100111110
37111011011111100
38111011011111010
39111101111010110
400010001011000011
410010001010001011
420010001001000111
430010001000010111
440010000111000011
450010000101100011
460010000101000111
470010000000110111
480001110001000011
490001010001010021
500000110001100021
511000001011100131
521101100011011031
530011110110101131
541111001001101121
551110101011110021
560000001101010121
570000001111001121
580111111100011121
590110101111101121
601010110110111121
611001101101111121
621111110011101021
631111001011110121
641101111101110021
650011111110111121
660001111111101121
670001111011101021
680001111001011101
690000010110011111
701111110101111001
711111110101110121
720000000101101101
730000000101011111
741111110100111101
75
76
77
Sheet1


Thank you in advance

Regards,
Kishan
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
In S8 and copy across and down:
Code:
=IF(AND($R8>0,D8=1,SUM($S8:S8)=0),1,"")
 
Upvote 0
In S8 and copy across and down:
Code:
=IF(AND($R8>0,D8=1,SUM($S8:S8)=0),1,"")
Hi Joe, after applying your formula I notice that in some of the rows post#1 my results were not correct like in row 22, 23, 68, 70 & in 74

Your formula worked spot on

Thank you very much for your help and time

Have a nice day

Regards,
Kishan :)

 
Upvote 0
Hi Joe, after applying your formula I notice that in some of the rows post#1 my results were not correct like in row 22, 23, 68, 70 & in 74

Your formula worked spot on

Thank you very much for your help and time

Have a nice day

Regards,
Kishan :)

You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

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