Macros

  • Thread starter gjameson via OfficeKB.com
  • Start date
G

gjameson via OfficeKB.com

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
 
G

Gord Dibben

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
 
G

gjameson via OfficeKB.com

Thank you so much. This was perfect.

Gerald

Gord said:
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
 
Top