Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA for comparing data within a range for Excel 2003
Hi
You don't need vba to solve this one. A formula will work just as well. Put this in the appropriate cell and drag it down. =IF(ISBLANK(D2),"",IF((AND((D2<B2),(C2<A2))),"Uptr end","Downtrend")) VBA will do the job if you do not want to drag your formula to the bottom of the range each time. Take care Marcus Sub Fill() Dim lw As Integer lw = Range("D" & Rows.Count).End(xlUp).Row Range("E2").AutoFill Range("E2:E" & lw) End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA for comparing data within a range for Excel 2003
Thanks Marcus,
The formula would work, but the problem is that appearance of a value in column AD is completely random, so using the IF(AND(D2<B2),(C2<A2) does not work accurately. Jeff "marcus" wrote: Hi You don't need vba to solve this one. A formula will work just as well. Put this in the appropriate cell and drag it down. =IF(ISBLANK(D2),"",IF((AND((D2<B2),(C2<A2))),"Uptr end","Downtrend")) VBA will do the job if you do not want to drag your formula to the bottom of the range each time. Take care Marcus Sub Fill() Dim lw As Integer lw = Range("D" & Rows.Count).End(xlUp).Row Range("E2").AutoFill Range("E2:E" & lw) End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
getting data from a range in another workbook (excel 2003) | Excel Discussion (Misc queries) | |||
Excel 2003 - Charts - "Data Range" and Date/Time data on X-Axis | Charts and Charting in Excel | |||
Comparing Data in Excel 2003 | Excel Worksheet Functions | |||
excel 2003 help comparing prices for lowest | Excel Worksheet Functions | |||
Comparing a value to a list of values does not work in Excel 2003. | Excel Worksheet Functions |