ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide/Show rows based on Conditions (https://www.excelbanter.com/excel-programming/416874-hide-show-rows-based-conditions.html)

manfareed

Hide/Show rows based on Conditions
 
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,



Mike H

Hide/Show rows based on Conditions
 
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

"manfareed" wrote:

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,



manfareed

Hide/Show rows based on Conditions
 
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





"Mike H" wrote:

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

"manfareed" wrote:

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,



manfareed

Hide/Show rows based on Conditions
 
No lomger looking for a solution

"manfareed" wrote:

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





"Mike H" wrote:

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

"manfareed" wrote:

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,




All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com