LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Changing Values

Hi All

I have adapted the code below off info gleaned on this forum and it works OK
, however a question was asked of me what would happen if I was on Holiday or
absent through sickness etc - how would we change the values listed below.
Private Sub Add100_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Customers Prices")
Worksheets("Customers Prices").Select
Range("A3").Select
Tb100.Value = Application.CountIf(Range("J3:J600"), "30")
Tb101.Value = Tb100.Value * 30
Tb102.Value = Application.CountIf(Range("J3:J600"), "15")
Tb103.Value = Tb102.Value * 15
Tb106.Value = Application.CountIf(Range("J3:J600"), "13")
Tb107.Value = Tb106.Value * 13
Tb108.Value = Application.CountIf(Range("J3:J600"), "10")
Tb109.Value = Tb108.Value * 10
Tb110.Value = Application.CountIf(Range("J3:J600"), "5")
Tb111.Value = Tb110.Value * 5
Tb112.Value = Application.CountIf(Range("J3:J452"), "CAR*")
Tb114.Value = Application.CountIf(Range("J3:J452"), "FREE*")
Tb104.Value = (Val(Trim(Tb100.Value))) + (Val(Trim(Tb102.Value))) +
(Val(Trim(Tb106.Value))) + (Val(Trim(Tb108.Value))) +
(Val(Trim(Tb110.Value))) + (Val(Trim(Tb112.Value))) + (Val(Trim(Tb114.Value)))
Tb105.Value = (Val(Trim(Tb101.Value))) + (Val(Trim(Tb103.Value))) +
(Val(Trim(Tb107.Value))) + (Val(Trim(Tb109.Value))) + (Val(Trim(Tb111.Value)))
Tb105.Value = FormatCurrency(Tb105.Value, 2)
Tb103.Value = FormatCurrency(Tb103.Value, 2)
Tb101.Value = FormatCurrency(Tb101.Value, 2)
Tb107.Value = FormatCurrency(Tb107.Value, 2)
Tb109.Value = FormatCurrency(Tb109.Value, 2)
Tb111.Value = FormatCurrency(Tb111.Value, 2)
End Sub

Any help or suggestions most helpful??
--
Many thanks

hazel
 
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
Changing values by a % jon Excel Worksheet Functions 4 January 21st 09 03:05 PM
changing values ydkjim Excel Discussion (Misc queries) 2 November 18th 08 12:30 PM
changing values in one column based on values in another? QuickLearner[_18_] Excel Programming 1 July 10th 06 04:18 PM
Changing Cell Values RD Wirr Excel Programming 3 November 15th 05 02:21 AM
Changing values in formulas with VBA mirca_00 Excel Programming 3 June 23rd 04 02:51 AM


All times are GMT +1. The time now is 11:08 AM.

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

About Us

"It's about Microsoft Excel"