Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
i have a worksheet in which "ENTRY" and "EXIT" is entered. entry is from A3:D3 and its total comes in E3. exit comes in G3:J3 and its total comes in K3. now E3=k3.
when i enter data in any of the columns of exit and as a result when the total in col K3 does not tally with that of E3 there should be a error message. as per the vbcode in the attached excel file, it works for the row A3. i wanted to apply the code for the whole of the worksheet. how can i accomplish that? thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sunday, October 28, 2012 11:45:53 AM UTC-5, sumesh56 wrote:
i have a worksheet in which "ENTRY" and "EXIT" is entered. entry is from A3:D3 and its total comes in E3. exit comes in G3:J3 and its total comes in K3. now E3=k3. when i enter data in any of the columns of exit and as a result when the total in col K3 does not tally with that of E3 there should be a error message. as per the vbcode in the attached excel file, it works for the row A3. i wanted to apply the code for the whole of the worksheet. how can i accomplish that? thanks. +-------------------------------------------------------------------+ |Filename: entry and exit-confirmed.zip | |Download: http://www.excelbanter.com/attachment.php?attachmentid=645| +-------------------------------------------------------------------+ -- sumesh56 use Set EntryRng = Range(Cells(Target.Row, 1), Cells(Target.Row, 4)) ' Range("A3:D3") Set ExitRng = Range(Cells(Target.Row, "G"), Cells(Target.Row, "J")) ' Range("G3:J3") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Apply code to Icon | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Apply code to other worksheets | Excel Programming | |||
run code on opening workbook and apply code to certain sheets | Excel Programming | |||
macro to apply worksheet event to active worksheet | Excel Programming |