Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2012, 11:43 AM
li roy li roy is offline macro Windows 7 64bit macro Office 2010 32bit
Novice
macro
 
Join Date: Feb 2012
Posts: 3
li roy is on a distinguished road
Default macro


I have a similar file, I'm looking for code that will make summary data at the touch of a button as shown in the example in the file.

i have Particular problem in transfer the first row of data



Attached Files
File Type: xlsm Calculation1.xlsm (14.6 KB, 5 views)
Reply With Quote
  #2  
Old 04-30-2012, 11:54 PM
macropod's Avatar
macropod macropod is offline macro Windows 7 64bit macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,050
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

hi li roy,

It's not entirely clear what you want to do. That said, I think the following is a better version of the forumula you have in A9:
=(($B$2-$C$2)*(1-$D$2)*2+$C$2*(1+(A2>1)))*(A2>0)+(($B$2-$C$2)*0.5+$C$2)*MAX((A2-2),0)
This formula allows for A2 to have 0 and numbers greater than 4 - you can even input increments of, say, 0.5 for infants, if you want.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I assign a macro to a button when the macro is in my personal workbook? foolios Excel Programming 2 07-27-2011 02:41 PM


All times are GMT -7. The time now is 06:02 AM.


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