Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
Can anyone please help with writing a macro to check the following:
If sheet1!a4:af4 < sheet2!a4:af4 then msgbox("error") Thanks |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
This formula:
=SUMPRODUCT((Sheet1!A4:AF4=Sheet2!A4:AF4)*1) will return the value 32 if every cell in Sheet1!a4:af4 is equal to the corresponding cell in Sheet2!a4:af4 (including blanks). If one cell is different then 31 is returned, if two cells differ then 30 is returned and so on. So, you could record a macro while you type this formula in a cell somewhere to get the syntax, and then embody it in an If Then Else checking to see if the value is less than 32 to trigger your message. You could use the value in an amended message to indicate how many errors there are. Hope this helps. Pete On Jun 8, 9:11 pm, Angie wrote: Can anyone please help with writing a macro to check the following: If sheet1!a4:af4 < sheet2!a4:af4 then msgbox("error") Thanks |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
Fri, 8 Jun 2007 13:11:01 -0700 from Angie
: Can anyone please help with writing a macro to check the following: If sheet1!a4:af4 < sheet2!a4:af4 then msgbox("error") Is this a homework problem? Please tell us what you have tried, specifically. -- Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |