Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-13-2018, 03:28 AM
staicumihai staicumihai is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2010 32bit
Advanced Beginner
Formula to get text from multiple cells in Excel 2007
 
Join Date: Dec 2015
Posts: 33
staicumihai is on a distinguished road
Default Formula to get text from multiple cells in Excel 2007

Hi guys

I have a table in excel 2007 and one of the columns is with dates

I need a formula to lookup the current day (today) in those columns and for every time it finds a match to get the text from a cell on that line.

For example if I have the table below

BMW 11.11.2018 Opel 11.11.2018 Audi 13.11.2018 Skoda 13.11.2018
Lets say the today date is 13.11.2018
I need the result in a cell to be

Audi


Skoda

Any ideas ?
Thanks
Reply With Quote
  #2  
Old 11-13-2018, 05:24 AM
Marcia's Avatar
Marcia Marcia is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Here you go:

=IF(ISNA(INDEX($B$1:$B$4,SMALL(IF($A$1:$A$4=TODAY( ),ROW($B$1:$B$4)-ROW($B$1)+1),ROWS($B$1:$B1)))),"",INDEX($B$1:$B$4, SMALL(IF($A$1:$A$4=TODAY(),ROW($B$1:$B$4)-ROW($B$1)+1),ROWS($B$1:$B1))))
Where Col B contains the list of cars
Col A the date/s

This is an array formula so confirm this with Ctrl+Shift+Enter
Reply With Quote
  #3  
Old 11-13-2018, 07:25 AM
staicumihai staicumihai is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2010 32bit
Advanced Beginner
Formula to get text from multiple cells in Excel 2007
 
Join Date: Dec 2015
Posts: 33
staicumihai is on a distinguished road
Default

Thanks Marcia for your quick reply

I did what you told me

I pasted the formula in a cell and then I preses Ctrl+Shift+Enter and it gave me the message "the formula you typed contains an error"
Reply With Quote
  #4  
Old 11-13-2018, 11:40 AM
xor xor is online now Formula to get text from multiple cells in Excel 2007 Windows 10 Formula to get text from multiple cells in Excel 2007 Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Maybe like shown in the attached.
Attached Files
File Type: xlsx GetText.xlsx (10.6 KB, 7 views)
Reply With Quote
  #5  
Old 11-13-2018, 03:38 PM
Marcia's Avatar
Marcia Marcia is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

I pasted the formula in a cell and then I preses Ctrl+Shift+Enter and it gave me the message "the formula you typed contains an error"[/quote]
There is an error because "today" is Nov 14 and you do not have nov 14 in your data. Insert a cell where you type your reference date, like Xor's table. Replace TODAY() with the cell address of your reference date. Learn to name your table and range, it is very flexible when copying formulas down rows or across columns.
I guess IF ISNA is not applicable with INDEX MATCH function so remove / edit the formula. See the formula in D3 and E3, compare it with D2 and E2.
Attached Files
File Type: xlsx GetText.xlsx (15.9 KB, 9 views)
Reply With Quote
  #6  
Old 11-13-2018, 03:40 PM
Marcia's Avatar
Marcia Marcia is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Xor, I don't think IFERROR works with Excel 2007. And maybe even INDEX MATCH?
Reply With Quote
  #7  
Old 11-13-2018, 04:20 PM
xor xor is online now Formula to get text from multiple cells in Excel 2007 Windows 10 Formula to get text from multiple cells in Excel 2007 Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Marcia, IFERROR was new in Excel 2007 and it works fine with both INDEX and MATCH.

If you don't want or can't use IFERROR then use =IF(ISERROR(....
Reply With Quote
  #8  
Old 11-13-2018, 11:19 PM
Marcia's Avatar
Marcia Marcia is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Quote:
Originally Posted by xor View Post
Marcia, IFERROR was new in Excel 2007 and it works fine with both INDEX and MATCH.

If you don't want or can't use IFERROR then use =IF(ISERROR(....

I "sit down" corrected xor. Since the advent of MS Excel, the formulas I used was just the MDAS (multiplication, division, addition, subtraction) operations until two years ago when I started exploring and maximizing the many features of the program. I am wondering what's caused the formula i gave to Stai to return error messages when I had made sure that it was OK before posting it.
Reply With Quote
  #9  
Old 11-14-2018, 12:05 AM
xor xor is online now Formula to get text from multiple cells in Excel 2007 Windows 10 Formula to get text from multiple cells in Excel 2007 Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Marcia

You cannot use ISNA in the above case.
Select D4 and (in the Formula field) highlight exactly the following part of the formula:
=INDEX($B$2:$B$7,SMALL(IF($A$2:$A$7=TODAY( ),ROW($B$2:$B$7)-ROW($B$2)+1),ROWS($B$2:$B4)))
press Ctrl+C to take a copy and paste it in an empty cell (say I4). Now put an equal sign in front of this and hold down Ctrl and Shift before pressing Enter to make it an array formula. With I4 selected press Evaluate Formula and press the Evaluate button 8 times after which you will see the following:
INDEX($B$2:$B$7, SMALL(IF(FALSE, FALSE, FALSE, FALSE, 5, 6), 3))
But the SMALL function can't return the third smallest value from an array with only 2 values (different from FALSE). That is why you get the #NUM! error.
And ISNA(#NUM!)=FALSE, so finally you have =IF(ISNA(#NUM!, "", #NUM!) which returns #NUM!
Reply With Quote
  #10  
Old 11-14-2018, 05:19 AM
Marcia's Avatar
Marcia Marcia is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you Xor for the precise instructions on how I should evaluate a formula. I didn't know about this process. I could now analyze how a formula with several nested functions work.
Reply With Quote
  #11  
Old 11-14-2018, 10:17 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Formula to get text from multiple cells in Excel 2007 Windows 7 64bit Formula to get text from multiple cells in Excel 2007 Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

@Marcia
Don't forget the " evaluate formula tool"
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #12  
Old 11-14-2018, 08:06 PM
Marcia's Avatar
Marcia Marcia is offline Formula to get text from multiple cells in Excel 2007 Windows 7 32bit Formula to get text from multiple cells in Excel 2007 Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you Pecoflyer, that's a tool that I had never tried to explore before xor shared its function. Another ignorance ticked off, one more knowledge added.
Reply With Quote
  #13  
Old 11-15-2018, 02:03 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Formula to get text from multiple cells in Excel 2007 Windows 7 64bit Formula to get text from multiple cells in Excel 2007 Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

You're welcome
and there is also this that might help
https://exceljet.net/tips/how-to-che...ormula-with-f9
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to get text from multiple cells in Excel 2007 Help with Formula to extracting text from text string Haha88 Excel 9 02-05-2018 01:04 AM
Formula to Extract text from a text string Haha88 Excel 2 11-14-2017 01:32 AM
If text in column then formula in other Grubermen Excel 1 09-06-2017 06:35 AM
Formula to get text from multiple cells in Excel 2007 Editing the text a formula gets me Jiing Chiang Excel 7 02-08-2016 10:01 PM
extract text with formula s7y Excel 7 06-05-2013 06:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft