View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Continue formula until reaching a blank cell.

Dear Alberta

Try the below.

RowCount = 1
'I am not sure what row count is at the beginning. change to suit
'Loop Until E is empty
Do While Range("E" & RowCount) < ""

'put your formulas 1,2,3 inside the loop
'Range("U" & RowCount) = "=IF(V" & RowCount & "<AA" & RowCount & _
",AA" & RowCount & "*AG" & RowCount & ",MAX(K" & RowCount & _
",N" & RowCount & ",AA" & RowCount & "*AG" & RowCount & "))"

RowCount = RowCount + 1
Loop

If this post helps click Yes
---------------
Jacob Skaria


"Alberta Rose" wrote:

I have 3 formulas that need to be repeated in column U (dependant on the cost
type) as long as there is information in column E. One of the formulas I
have in Column U is: =IF(V" & RowCount & "<AA" & RowCount & _
",AA" & RowCount & "*AG" & RowCount & ",MAX(K" & RowCount & _
",N" & RowCount & ",AA" & RowCount & "*AG" & RowCount & "))".

Would I need to put another =IF in front of this code to have it proceed and
run this formula until it encounters a blank cell in column E?

It's my last little bit on this MONSTER! Help anyone ??