#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional

Hello,

I have a column that countains fee discriptions and every now and then
a total fees cell. In the next row to the right I have the amount of
those fees and a blank cell next to the total cell. I need to put a
total in that blank cell that is the total of about 1/2 dozen different
kinds of fees, but not all of the fees that are on the sheet.

Can this be done w/ a sub? Does anybody have an example for me?


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Conditional

Hi
not quite sure what you're trying to achieve. You may post some example
rows (plain text, no attachments please) and describe your desired
result

--
Regards
Frank Kabel
Frankfurt, Germany

Hello,

I have a column that countains fee discriptions and every now and

then
a total fees cell. In the next row to the right I have the amount of
those fees and a blank cell next to the total cell. I need to put a
total in that blank cell that is the total of about 1/2 dozen
different kinds of fees, but not all of the fees that are on the
sheet.

Can this be done w/ a sub? Does anybody have an example for me?


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional

Fee Discription $

total fee
ticket 10
light 50
transit 10
total fee

lets say i need to fill the cells to the lft of the "Total fee" cel
with the sum of ticket and transit fees.

one million thank you

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Conditional

Hi
should the result in 'total fee' be dynamic or is it sufficient to run
a macro ones and insert the values? If yes try the following:
- select you cells which you want to process (thats is in your example
column B):
- start the following macro

sub total_insert()
dim rng as range
dim cell as range
dim ret_value
set rng = selection
ret_value=0
for each cell in rng
if cell.offset(0,-1).value="total fee" then
cell.value= ret_value
ret_value = 0
elseif cell.offset(0,-1).value = "ticket" or
cell.offset(0,-1).value = "transit" then
ret_value = ret_value + cell.value
end if
next
end sub


--
Regards
Frank Kabel
Frankfurt, Germany

Fee Discription $

total fee
ticket 10
light 50
transit 10
total fee

lets say i need to fill the cells to the lft of the "Total fee" cell
with the sum of ticket and transit fees.

one million thank yous


---
Message posted from http://www.ExcelForum.com/


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
New Conditional Format Overriding Previous Conditional Format Rene Excel Discussion (Misc queries) 3 February 27th 08 06:08 PM
Conditional Rank (or rather, Conditional Range) [email protected] Excel Worksheet Functions 6 April 16th 07 06:15 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 09:07 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"