Hide/Show rows based on Conditions

M

manfareed

Repost ...
Hi,
I would appreciate your help with the following.

I have a spreadsheet with data in columns A to T.

I need a VBA code for the following conditions ...

Conditions for Macro:
1. Only display complete row, if cell has "F" in it . "F" is on its own not
as part of a word.
2. Where there is a letter "F", replace in final spreadsheet once macro has
run, with the word "Alert!"
3. If there is no "F" in the row, and it there is the word "Passport" in
column L, HIDE LINE/ ROW
4. If there is no "F" in the row, and it does not have the word "Passport"
in column L, SHOW line/ row
5. Sort the whole result, by column "B"

Thanks,
 
M

Mike H

Hi,

You posted this yesterday and I didn't understand it then!

This bit is clear
1. Only display complete row, if cell has "F" in it . "F" is on its own not
as part of a word.

This bit isn't please clarify.
2. Where there is a letter "F", replace in final spreadsheet once macro has
run, with the word "Alert!"

This doesn't make sense. The row will already be hidden because there is no
'F' in the row. What is the point of the second check for the word 'Passport'
and what do we do if it isn't in Column L?
3. If there is no "F" in the row, and it there is the word "Passport" in
column L, HIDE LINE/ ROW

Mike
 
M

manfareed

Hi Mike ,

Thanks for your reply...

I was given the conditions ...

Condition 1 and 2 are linked .... Once the first condition has runthen
replace "F" with "Alert".
I agree ...condition 3 seems surplus since it would be hidden anyway.

But for condition 4 I would need to show row if it has neither "F" nor
"passport" in column L. Passport has to be in column L.

I hope this is clearer.

Thanks,

Manir
 
M

manfareed

No lomger looking for a solution

manfareed said:
Hi Mike ,

Thanks for your reply...

I was given the conditions ...

Condition 1 and 2 are linked .... Once the first condition has runthen
replace "F" with "Alert".
I agree ...condition 3 seems surplus since it would be hidden anyway.

But for condition 4 I would need to show row if it has neither "F" nor
"passport" in column L. Passport has to be in column L.

I hope this is clearer.

Thanks,

Manir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top