Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alaxmen
 
Posts: n/a
Default If Statement based on blank fields

I am trying to write an IF statement in a cell for a calculation based
on whether a cell is blank or not. This is what I have started with
but I know it isn't correct
=IF(ISBLANK(D7),(D6-D2))&IF(ISBLANK(D6),(D5-D2))

Example:

Cell
Weekly Standard 10,000 (D2)
Week 1 Input 2,000 (D3)
Week 2 Input 13,500 (D4)
Week 3 Input (D5)
Week 4 Input (D6)
Week 5 Input (D7)

Variance Amount (D9) (i.e D4-D2)

(This field should be based on the last entry made minus the weekly
standard.
The formula needs to start with Week #5 then 4 then 3 then 2. Any help
with this would be greatly appreciated especially with my limited
knowledge.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default If Statement based on blank fields

Giving overworked IF a rest, try
=D2-INDIRECT("D"&COUNT(D3:D7)+2)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"alaxmen" wrote in message
oups.com...
I am trying to write an IF statement in a cell for a calculation based
on whether a cell is blank or not. This is what I have started with
but I know it isn't correct
=IF(ISBLANK(D7),(D6-D2))&IF(ISBLANK(D6),(D5-D2))

Example:

Cell
Weekly Standard 10,000 (D2)
Week 1 Input 2,000 (D3)
Week 2 Input 13,500 (D4)
Week 3 Input (D5)
Week 4 Input (D6)
Week 5 Input (D7)

Variance Amount (D9) (i.e D4-D2)

(This field should be based on the last entry made minus the weekly
standard.
The formula needs to start with Week #5 then 4 then 3 then 2. Any help
with this would be greatly appreciated especially with my limited
knowledge.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default If Statement based on blank fields

As long as there are no gaps in the data, you could use

=OFFSET(D2,COUNTA(D2:D7)-1,0)-D2

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"alaxmen" wrote in message
oups.com...
I am trying to write an IF statement in a cell for a calculation based
on whether a cell is blank or not. This is what I have started with
but I know it isn't correct
=IF(ISBLANK(D7),(D6-D2))&IF(ISBLANK(D6),(D5-D2))

Example:

Cell
Weekly Standard 10,000 (D2)
Week 1 Input 2,000 (D3)
Week 2 Input 13,500 (D4)
Week 3 Input (D5)
Week 4 Input (D6)
Week 5 Input (D7)

Variance Amount (D9) (i.e D4-D2)

(This field should be based on the last entry made minus the weekly
standard.
The formula needs to start with Week #5 then 4 then 3 then 2. Any help
with this would be greatly appreciated especially with my limited
knowledge.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alaxmen
 
Posts: n/a
Default If Statement based on blank fields

Gentlemen, I tried both suggestions with equal results. Thanks for you
help in this matter for truly I could not done it with out you.
Thanks....

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to have result field blank Ellen Excel Discussion (Misc queries) 2 December 13th 05 09:42 PM
IF Statement Question 0 values & blank cells joshmd9909 Excel Worksheet Functions 6 October 10th 05 01:14 PM
I want a blank space on a worksheet when the question is blank? Patrizia Excel Discussion (Misc queries) 2 June 23rd 05 12:51 AM
How do I retain blank cell status in an IF statement? HWI Charts and Charting in Excel 2 June 6th 05 07:25 AM
count based on two fields - need quickly JO Excel Worksheet Functions 1 November 1st 04 09:44 PM


All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"