Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Loop excel formula

Hi,

I need to loop through
A1, B1, C1, D1
- then do some IF checking

Is there a FOR excel formula ? Or is there a better way ?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Loop excel formula

A more detailed explanation with example of before/after

--
Don Guillett
SalesAid Software

"magix" wrote in message
...
Hi,

I need to loop through
A1, B1, C1, D1
- then do some IF checking

Is there a FOR excel formula ? Or is there a better way ?

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Loop excel formula

Dim myRng as range
dim myCell as range

with worksheets("sheet9999")
set myrng = .range("a1:D1")
end with

for each mycell in myrng.cells
if mycell.value = "hi" then
msgbox "It said hi!"
else
msgbox "No it didn't"
end if
next mycell



magix wrote:

Hi,

I need to loop through
A1, B1, C1, D1
- then do some IF checking

Is there a FOR excel formula ? Or is there a better way ?

Thanks.


--

Dave Peterson
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
Too Many IF Statements Nesting Error (Excel Formula Loop w/o VBA) retailmessiah[_2_] Excel Worksheet Functions 7 February 10th 10 06:52 PM
Loop same formula for different columns? JD Excel Programming 0 February 3rd 06 02:20 AM
excel loop in cell formula Gixxer_J_97[_2_] Excel Programming 1 September 27th 05 03:04 PM
Excel formula similar to a loop in Basic? Cashtime Excel Worksheet Functions 2 February 6th 05 07:53 PM
Loop within Excel Formula? Dan[_29_] Excel Programming 3 December 23rd 03 10:26 PM


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