Last cell/column in a row with a paticular data

akshadd

New Member
Joined
Jul 5, 2010
Messages
2
Hi All,

I have dynamnic no of columns for a row .
Except a first few columns for that row ,all successive columns will have data as either PASS or FAIL(see eg below). is there any excel function which can tell me which is the last column/cell with either PASS or FAIL.

e.g :
COL1 COL2 COL3 COL4 COL5 COL6
ABC 123 PASS FAIL PASS FAIL

Thanks
Akshay
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the board!

Is this what you're looking for?
Excel Workbook
ABCDEFGH
1ABC123PASSFAILPASSFAILCol 5
2ABC124PASSFAILFAILPASSCol 6
3ABC125PASSFAILPASSFAILCol 6
4ABC126PASSFAILFAILPASSCol 5
Sheet
 
Upvote 0
Hi Jason,

Thanks a ton for ur quick reply.
Well actually i am looking for the last column with data (PASS OR FAIL) , i.e in your example COL6 is the expected answer. I wanted to know at which column number the dynamic columns have ended .

Actually i will be having dynamic columns for a row with PASS or FAIL as its only data, i require the last column , that column no. will be same for all other rows .
 
Upvote 0
If I understand what you're asking for correctly, try

="Col "&MAX(IF(((C1:F4="PASS")+(C1:F4="Fail"))>0,COLUMN(C1:F4),0))

I think that's what you need.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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