Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
getting data from a range in another workbook (excel 2003) Mainer Excel Discussion (Misc queries) 3 November 7th 09 03:25 PM
Excel 2003 - Charts - "Data Range" and Date/Time data on X-Axis erik Charts and Charting in Excel 1 August 20th 07 02:50 PM
Comparing Data in Excel 2003 Diamonds_Mine Excel Worksheet Functions 7 June 21st 07 10:04 PM
excel 2003 help comparing prices for lowest paul Excel Worksheet Functions 4 March 4th 06 09:11 AM
Comparing a value to a list of values does not work in Excel 2003. RagDyer Excel Worksheet Functions 3 March 29th 05 02:12 AM


All times are GMT +1. The time now is 07:18 PM.

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

About Us

"It's about Microsoft Excel"