Find the part number in which data are located

Kishan

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

Hi,

My data are divided in the 4-parts (part-1 to part-4) in columns C:AC, within these columns in the each row is filled only one cell within any of 4-parts.

I want the results in column AE:AH "part number2 in which part data are located

Example data.


Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAI
1
2
3
4ResultResultResultResult
5Part 1Part 2PART 3Part 4Part1Part2Part3Part4
61|X|12
71|X|12
8X|1|X3
9X|X|X4
102|X|13
11X|1|X3
121|X|X3
13X|2|X4
141|1|11
151|2|11
161|X|X3
171|X|X3
181|1|11
19X|1|23
201|1|11
211|1|11
221|1|11
231|2|21
241|1|X2
25
26
27
Sheet10


Thank you in advance

Regards,
Kishan
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
.
The formula you can use is COUNTA.

Code:
=IF(COUNTA(C6:J6)=0,"","1")

Paste the above formula in AE6 and drag down the column.



In AF6 paste and drag down :
Code:
=IF(COUNTA(K6:M6)=0,"","2")


In AG6 paste and drag down :
Code:
=IF(COUNTA(N6:V6)=0,"","3")


In AH6 paste and drag down :
Code:
=IF(COUNTA(W6:AC6)=0,"","4")
 
Upvote 0
.
The formula you can use is COUNTA.

Code:
=IF(COUNTA(C6:J6)=0,"","1")

Paste the above formula in AE6 and drag down the column.



In AF6 paste and drag down :
Code:
=IF(COUNTA(K6:M6)=0,"","2")


In AG6 paste and drag down :
Code:
=IF(COUNTA(N6:V6)=0,"","3")


In AH6 paste and drag down :
Code:
=IF(COUNTA(W6:AC6)=0,"","4")
Hello Logit, yes formulas worked with the post#1 perfectly, as my original data results are based on formulas, adapting your idea I changed COUNTA to SUMPRODUCT

Code:
=IF(SUMPRODUCT(--(C6:J6>"")),1,"") 
=IF(SUMPRODUCT(--(K6:M6>"")),2,"")
=IF(SUMPRODUCT(--(N6:V6>"")),3,"")
=IF(SUMPRODUCT(--(W6:AC6>"")),4,"")

Thank you very much for your help and time

Have a nice day

Regards,
Kishan :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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