LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Need a help of preparing excel macro

Hi Sheeloo,

I have sent yo uexample file. Can you please check..

Kam.

"Sheeloo" wrote:

append @hotmail.com to to_sheeloo or click on my name for instructions to
get the mail

"Kamlu" wrote:

Hi Sheeloo,

Thanks for your help. I have checked this Macro & it is giving output but
not to 100%. Can you please give me email ID so I can send you example file.

Kam.

"Sheeloo" wrote:

Chris,

This will not work as there may be one, two or more than two rows for a Bill
No.

"Chris Bode via OfficeKB.com" wrote:

You can do this using a macro
Please follow following steps
1.Right Click toolbarclick control box
2.From control box select a command button and draw it to your sheet
3.Double click the command button to open code window and paste following
codes
Private Sub CommandButton1_Click()
Dim row As Integer, col As Integer
row = 2
col = 2

Dim amt1 As Double, amt2 As Double
amt1 = 0
amt2 = 0

While Sheet1.Cells(row, col).Value < ""

If Sheet1.Cells(row, col).Value = Sheet1.Cells(row - 1, col).Value
Then
amt1 = CDbl(Trim(Sheet1.Cells(row, col + 2).Value))
amt2 = CDbl(Trim(Sheet1.Cells(row - 1, col + 2).Value))

If Abs(amt1 + amt2) <= 10 Then

Sheet1.Cells(row, col + 3).Value = "C"
Sheet1.Cells(row - 1, col + 3).Value = "C"

End If

End If

row = row + 1
Wend
End Sub

Now you will get the result on clicking the command button

Hope this one works for you

Have a nice time€¦.

Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com

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


 
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
Preparing Data for Pivot Table Monique Excel Discussion (Misc queries) 1 August 24th 08 06:06 PM
Please help, Preparing properties automation needed? Kevin Clark[_2_] Excel Discussion (Misc queries) 0 October 5th 07 09:23 AM
Preparing of Phone Directory isis Setting up and Configuration of Excel 2 September 28th 07 03:54 AM
Reg: Preparing Charts using Pivot Data Anil Excel Discussion (Misc queries) 6 June 18th 07 03:30 PM
Macro preparing numbers to be booked (columns to be chosen conditionally) markx Excel Worksheet Functions 0 May 23rd 06 03:11 PM


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