Team-BHP > Shifting gears > Gadgets, Computers & Software
Register New Topics New Posts Top Thanked Team-BHP FAQ


Reply
  Search this Thread
15,486 views
Old 15th April 2016, 11:14   #46
BHPian
 
Join Date: Dec 2010
Location: Bangalore
Posts: 330
Thanked: 139 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Quote:
Originally Posted by MunnabhaiMBBS View Post
Hi guys, Would really appreciate your help.

Need a formula / function that reads the entire row and displays particular text / value in case the row contains a certain word.

For instance :

Row indicates : House is big : If row contains the word "House", then display "Good"

Thanks in advance.
If search is on particular cell, you can use below formula:
=IF(FIND(LOWER("house"),LOWER(A1),1)>0,"Good","Bad ")

This will return 'Good' if the word 'house' is found in cell A1. Else, it will return 'Bad'. I used 'Lower' to make it case insensitive.

EDIT:
To search for entire row, you can use the below formula.
=IF(MATCH("house",A:A,-1)>0,"Good","Bad")

Last edited by nfsfreak : 15th April 2016 at 11:22.
nfsfreak is offline  
Old 15th April 2016, 11:55   #47
BHPian
 
Join Date: Apr 2006
Location: Mumbai
Posts: 355
Thanked: 183 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Try this :
If the Row number 1 has House use formula ISNUMBER(SEARCH("House",1:1)) in say cell A2. It will return true if the row 1 has word House(does not mater in which cell of the Row 1) and False otherwise.
malgudi is offline  
Old 18th April 2016, 16:15   #48
BHPian
 
Join Date: Jul 2014
Location: -
Posts: 340
Thanked: 803 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Quote:
Originally Posted by nfsfreak View Post
If search is on particular cell, you can use below formula:
=IF(FIND(LOWER("house"),LOWER(A1),1)>0,"Good","Bad ")

This will return 'Good' if the word 'house' is found in cell A1. Else, it will return 'Bad'. I used 'Lower' to make it case insensitive.

EDIT:
To search for entire row, you can use the below formula.
=IF(MATCH("house",A:A,-1)>0,"Good","Bad")
Thank you so much for the help.

Formula 1 : Worked partially, Showing "#VALUE" in place of Bad.

Formula 2 : Returned " #N/A" everywhere.

Quote:
Originally Posted by malgudi View Post
Try this :
If the Row number 1 has House use formula ISNUMBER(SEARCH("House",1:1)) in say cell A2. It will return true if the row 1 has word House(does not mater in which cell of the Row 1) and False otherwise.
Thanks Malgudi,

Formula returned "0" in every row.
MunnabhaiMBBS is offline  
Old 18th April 2016, 16:34   #49
BHPian
 
Join Date: Apr 2006
Location: Mumbai
Posts: 355
Thanked: 183 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Quote:

Thanks Malgudi,

Formula returned "0" in every row.
Not Sure Why but this is what I tried
Microsoft Excel : Tips, Issues, Etc.-temp.jpg
malgudi is offline  
Old 18th April 2016, 17:31   #50
BHPian
 
Join Date: Dec 2010
Location: Bangalore
Posts: 330
Thanked: 139 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Quote:
Originally Posted by MunnabhaiMBBS View Post
Thank you so much for the help.
Formula 1 : Worked partially, Showing "#VALUE" in place of Bad.
Corrected formula: =IF(ISNUMBER(FIND(LOWER("house"),LOWER(A2),0)),"go od","Bad ")


Quote:
Originally Posted by MunnabhaiMBBS View Post
Formula 2 : Returned " #N/A" everywhere.
Corrected formula: =IF(ISNUMBER((MATCH("house",2:2,-1))),"Good","Bad")

2:2 denotes entire 2nd row. change accordingly for related row number.
To search on entire columns, you can replace that with A:A or B:B (related column name)
nfsfreak is offline  
Old 19th April 2016, 18:28   #51
BHPian
 
Join Date: Jul 2014
Location: -
Posts: 340
Thanked: 803 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Quote:
Originally Posted by malgudi View Post
Not Sure Why but this is what I tried
Attachment 1498688
Quote:
Originally Posted by nfsfreak View Post
Corrected formula: =IF(ISNUMBER(FIND(LOWER("house"),LOWER(A2),0)),"go od","Bad ")



Corrected formula: =IF(ISNUMBER((MATCH("house",2:2,-1))),"Good","Bad")

2:2 denotes entire 2nd row. change accordingly for related row number.
To search on entire columns, you can replace that with A:A or B:B (related column name)
Thanks a lot both of you. Issue is now resolved.

Another puzzle:

- 3 different sheets with 100, 200 and 300 rows respectively. Can't predict the rows for subsequent sheets.
- Using Macro for Pivot table, current selected range is 300 (Rows)
- Need to select range for the available rows for future sheets, could be 500, 600, we don't know yet.
- Can we give specific range selection instruction so to accommodate all the rows in future.

Thanks in advance.
MunnabhaiMBBS is offline  
Old 20th April 2016, 00:08   #52
BHPian
 
Join Date: Apr 2006
Location: Mumbai
Posts: 355
Thanked: 183 Times

Quote:
Originally Posted by MunnabhaiMBBS View Post
Thanks a lot both of you. Issue is now resolved.



Another puzzle:



- 3 different sheets with 100, 200 and 300 rows respectively. Can't predict the rows for subsequent sheets.

- Using Macro for Pivot table, current selected range is 300 (Rows)

- Need to select range for the available rows for future sheets, could be 500, 600, we don't know yet.

- Can we give specific range selection instruction so to accommodate all the rows in future.



Thanks in advance.

Instead of selecting say a1:c300 as range for pivot table do select a:c . This will select all the data in a,b & c columns (irrespective of no of rows).
malgudi is offline  
Old 24th February 2019, 10:21   #53
BHPian
 
Spinnerr's Avatar
 
Join Date: Feb 2007
Location: Bangalore
Posts: 417
Thanked: 487 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Good morning!

Need a small help to display the data in the required format.

I have a master data sheet where 'Month' is a column. Rows are repeated for employees, when they have a record for the month. I would like to have this data displayed in a single row, kinda normalized view.

Hope the below pics explain it clearly.

How the data is:
Microsoft Excel : Tips, Issues, Etc.-1.jpg

What I got from Pivot table:
Microsoft Excel : Tips, Issues, Etc.-2.png

What I really want:
Microsoft Excel : Tips, Issues, Etc.-3.jpg

Note: The master table would not have a record if the employee is not active for any particular month, the same would have be shown as ZERO in the final data presented.

Any reusable solution is much appreciated. Thanks!
Spinnerr is offline  
Old 24th February 2019, 11:28   #54
Senior - BHPian
 
Join Date: Dec 2008
Location: Bangalore
Posts: 3,548
Thanked: 5,510 Times

Quote:
Originally Posted by Spinnerr View Post
I have a master data sheet where 'Month' is a column. Rows are repeated for employees, when they have a record for the month. I would like to have this data displayed in a single row, kinda normalized view.
Aren't you just asking for a Pivot Table?

Edit: Oh OK. I see now that you have tried Pivot Table already. Is this a one-off attempt or do you expect to see more rows each time a month passes? It might be a good idea to attach a sample spreadsheet which can then be used to publish suggestions.

Quote:
Originally Posted by Spinnerr View Post
Any reusable solution is much appreciated.
Gave it a try. Here's my attempt (attached).

Add raw data in the RAWDATA sheet and use drag fill in the OUTPUT sheet both ways (horizontally and vertically) to see the magic.

Adjusting to your own data is left as an exercise.
Attached Files
File Type: xlsx Book1.xlsx (11.0 KB, 97 views)

Last edited by tsk1979 : 24th February 2019 at 14:11.
binand is online now  
Old 24th February 2019, 13:48   #55
BHPian
 
Spinnerr's Avatar
 
Join Date: Feb 2007
Location: Bangalore
Posts: 417
Thanked: 487 Times
Re: Microsoft Excel : Tips, Issues, Etc.

Quote:
Originally Posted by binand View Post
It might be a good idea to attach a sample spreadsheet which can then be used to publish suggestions.
Will keep that in mind.


Quote:
Originally Posted by binand View Post
Gave it a try. Here's my attempt (attached).
... see the magic.
Magic indeed! Many thanks...

I will try to figure out the logic so that I can use it in future, but for now the data is ready in the right format.

Thanks again.
Spinnerr is offline  
Reply

Most Viewed


Copyright ©2000 - 2024, Team-BHP.com
Proudly powered by E2E Networks