#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Macros

I need to create a workbook that will import a text file every month. Once
imported I need to do a formula. Let me see if I can explain.Col a has my
numbers, I need to take the first 400 from A, and put the remainder in col C,
but only if col a is 400 and if it is less that 400 take the contents on A
and put in B. This is billing at different rates.

A B C
2000 400 1600
400 400 0
395 395 0
1000 400 600
--------------------------------
3795 1595 2200


Total of A should equal B+C

Where do I need to start?
I know very very little about macros and formula programming in Excel.

TIA
Gerald

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Macros

In B1 enter ==IF(A1="","",MIN(A1,400,A1)

In C1 enter =IF(OR(A1="",B1=""),"",A1-B1)

Drag/copy down.


Gord Dibben MS Excel MVP


On Wed, 06 Sep 2006 22:58:04 GMT, "gjameson via OfficeKB.com" <u21717@uwe
wrote:

I need to create a workbook that will import a text file every month. Once
imported I need to do a formula. Let me see if I can explain.Col a has my
numbers, I need to take the first 400 from A, and put the remainder in col C,
but only if col a is 400 and if it is less that 400 take the contents on A
and put in B. This is billing at different rates.

A B C
2000 400 1600
400 400 0
395 395 0
1000 400 600
--------------------------------
3795 1595 2200


Total of A should equal B+C

Where do I need to start?
I know very very little about macros and formula programming in Excel.

TIA
Gerald


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Macros

Thank you so much. This was perfect.

Gerald

Gord Dibben wrote:
In B1 enter ==IF(A1="","",MIN(A1,400,A1)

In C1 enter =IF(OR(A1="",B1=""),"",A1-B1)

Drag/copy down.

Gord Dibben MS Excel MVP

I need to create a workbook that will import a text file every month. Once
imported I need to do a formula. Let me see if I can explain.Col a has my

[quoted text clipped - 17 lines]
TIA
Gerald


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200609/1

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
Strip workbook of macros, VBA, MS Query, etc. Paul Kraemer Excel Discussion (Misc queries) 4 September 7th 06 01:30 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
how do I run excel 4.0 macros on excel 2000 RodolfoDallas Excel Discussion (Misc queries) 1 March 12th 06 03:14 AM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM


All times are GMT +1. The time now is 12:38 PM.

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

About Us

"It's about Microsoft Excel"