ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If...Then function (https://www.excelbanter.com/excel-programming/344070-if-then-function.html)

Pingin

If...Then function
 
I was wondering if anyone could help me get this to work

If Range("B30:BS30").Formula = "=SUM(B19:B29)" Then
Range("B31:BS31").Value = "yes"


Rowan Drummond[_3_]

If...Then function
 
Try:

Sub chkFrm()
Dim cell As Range
For Each cell In Range("B30:BS30")
If cell.FormulaR1C1 = "=SUM(R[-11]C:R[-1]C)" Then
cell.Offset(1, 0).Value = "yes"
End If
Next cell
End Sub


Hope this helps
Rowan

Pingin wrote:
I was wondering if anyone could help me get this to work

If Range("B30:BS30").Formula = "=SUM(B19:B29)" Then
Range("B31:BS31").Value = "yes"


Pingin

If...Then function
 
Thank you that was really helpful


Rowan Drummond[_2_]

If...Then function
 
You're welcome.

Pingin wrote:
Thank you that was really helpful



All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com