View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jose Rojas Jose Rojas is offline
external usenet poster
 
Posts: 16
Default CODE TO ADD TWO COLUMNS BASED ON ANOTHER

Sandy I will like to help but I dont Understant yourm petition please send
me the file to analize it
"Gauthier" wrote in message
...
hi all!
i have a spreadsheet which is not in 'database' format...it was a .txt doc
that imported into excel...
the named range for this database is called "history"...current range is
approx. 5500 lines...

COLUMN A COLUMN B COLUMN C

COLUMN
D COLUMN E
MM-YY SVC +$ 105 CAD/DAY $ 70- 105/DAY $ 35-
70/DAY $ 14- 35/DAY $
- empty row -
08-02 22 EXCHANGE RATE: 1 0.569
TOTAL REV 413,224.33 100,880.11
169,284.10 192,777.20

i would like to incorporate some VBA code that will:

ADD column D & E only where TOTAL REV is indicated in column A (i hope

this
makes sense!)

logic goes something like this:
select "history"
IF Column A = "TOTAL REV", then sum (column D & E), if not, then blank

would REALLY APPRECIATE your assistance!!!

Thanks!
Sandi