Kamis, 17 September 2015

Re: [ExcelVBA] Multiple IF Statements in Excel 2007

 



Hi
 
The below e-mail appeared in my in box today (18th September) but has a "Sent" date that corresponds with the date and time it originally appeared on this same group.  No idea why a second copy has appeared.
 
Anyway ... this question and its original thread can be found in the group archives for 26th August and following days.

Regards, Dave S
 
----- Original Message -----
Sent: Wednesday, August 26, 2015 3:23 AM
Subject: [ExcelVBA] Multiple IF Statements in Excel 2007

This may not be a VBA-related issue but I am struggling right now and I need your help. I posted this to other Excel groups but I am not getting any response from them.

Here's the scenario: when the user enters a number from 1-6 in C6, I want the program to calculate and give me the answer based on the hours inputted and other info.

C7 - Hours (users enter hours from 1 to 50)

F7–  where the formula or result should be

When user enters the following numbers

1 – if C7 =6 hours, 8.50. IF C7 <>6, multiply C7 by 1.40

2 – if C7 =6 hours, 4.25. IF C7 <>6, multiply C7 by 1.40 divide by 2 (or C6?)

3 – if C7 =6 hours, 2.85. IF C7 <>6, multiply C7 by 1.40 divide by 3 (or C6?)

4– if C7 =6 hours, 2.85. IF C7 <>6, multiply C7 by 1.40 divide by 4 (or C6?)

5– if C7 =6 hours, 2.85. IF C7 <>6, multiply C7 by 1.40 divide by 5 (or C6?)

6– if C7 =6 hours, 2.85. IF C7 <>6, multiply C7 by 1.40 divide by 6 (or C6?)

Notice numbers 3 to 6 have the same condition. Is there a one formula for them instead of repeating the formula? I use Excel 2007.Thank you very much and hope to hear from you soon!

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6140 / Virus Database: 4419/10652 - Release Date: 09/16/15

__._,_.___

Posted by: "David Smart" <smartware.consulting@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------

.

__,_._,___

Tidak ada komentar:

Posting Komentar