Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-14-2012, 11:37 PM
no1texan no1texan is offline If Function Challenge involving date Windows XP If Function Challenge involving date Office 2003
Novice
If Function Challenge involving date
 
Join Date: May 2012
Posts: 10
no1texan is on a distinguished road
Default If Function Challenge involving date

I need to use a simple If function formula. The difficulty is the test argument.



Example: Column B = dates in this column could be any month and day in years 2007 through 2012, formated as 06/10/2007, 09/03/2008.
Column F = amount such as 563.50, 315.95, etc.

Starting with column H through M, the header of the columns with be the years, H=2007, I=2008, etc.

For column H, row 10, which is for year 2007, I would like to test B10 if it is year 2007 and if yes, put the amount found in cell F10 in H10. In I10, I would like to test B10 if it is year 2008 and if yes, put the amount in cell B10 in I10. Do this for the remainder of the cells on row 10 for columns J through M, years 2009-2012 respectively. The amount in B10 will go in only one of the years from 2007 - 2012.

Thanks
Reply With Quote
  #2  
Old 07-15-2012, 12:47 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline If Function Challenge involving date Windows 7 64bit If Function Challenge involving date Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,770
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

Hi

perhaps posting a small sample sheet would help?
__________________
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
  #3  
Old 07-15-2012, 01:08 AM
no1texan no1texan is offline If Function Challenge involving date Windows XP If Function Challenge involving date Office 2003
Novice
If Function Challenge involving date
 
Join Date: May 2012
Posts: 10
no1texan is on a distinguished road
Default If Function Challenge involving date

I am attaching an example. The columns are not the same as in my original post but the idea is the same.
Attached Files
File Type: xls If Function Example.xls (16.0 KB, 16 views)
Reply With Quote
  #4  
Old 07-15-2012, 06:53 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline If Function Challenge involving date Windows 7 64bit If Function Challenge involving date Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,770
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

Does the attached help?
Attached Files
File Type: xls Copy of If Function Example.xls (16.0 KB, 11 views)
__________________
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
  #5  
Old 07-15-2012, 07:38 AM
no1texan no1texan is offline If Function Challenge involving date Windows XP If Function Challenge involving date Office 2003
Novice
If Function Challenge involving date
 
Join Date: May 2012
Posts: 10
no1texan is on a distinguished road
Default

Absolutely!! Thanks a bunch. The only part I am not totally understanding is the part of the formula *D3, i.e. the * being the 'times or multipy' symbol like 2*3=6. It looks like the formula is saying if the argument is true, then multiply what is in cell D3, or D7 and so on. But it works just great--thanks for your time and contribution.
Reply With Quote
  #6  
Old 07-15-2012, 09:03 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline If Function Challenge involving date Windows 7 64bit If Function Challenge involving date Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,770
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

Well, one usually uses an IF function to solve this kind of problems, which is perfectly all right.
I just decided to use another approach
(YEAR($B6)=E$2) will return TRUE or FALSE (must be between parenthesis. The multiplication or any other arithmetic operator will coerce these values to 1 or 0, thus returning the value needed or a 0.
To see a formula at work ,use "evaluate formula" under the formula ribbon
__________________
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
  #7  
Old 07-15-2012, 12:58 PM
no1texan no1texan is offline If Function Challenge involving date Windows XP If Function Challenge involving date Office 2003
Novice
If Function Challenge involving date
 
Join Date: May 2012
Posts: 10
no1texan is on a distinguished road
Default

Ok-I learned a lot from this exchange and a new way to solve Excel problems.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change format of date when using Now function in VB code Bondai Excel Programming 2 03-02-2012 05:09 PM
If Function Challenge involving date Word Challenge jpotter2 Word 3 03-22-2011 02:07 PM
If Function Challenge involving date Today's Date Function freschij Excel 3 02-11-2011 10:21 AM
Automatic Date Function Corrupting Printer Output Theodulf Word 0 05-28-2010 12:33 PM
Date Function in word? aligahk06 Word 1 04-21-2010 06:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:44 PM.


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