Combine Formulas

fishandtril

New Member
Joined
Nov 15, 2022
Messages
13
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello

I want to run two formulas in the same procedure. Not sure how to do this.

VBA Code:
Sub RunFormulas()
   With Sheets("Canary Counterparties")
      With .Range("AH7:AH" & .Range("AF" & Rows.Count).End(xlUp).Row)
        .Formula = "=IF(OR(RC[-30]<TODAY(),RC[-30]>R4C3),""Exclude"",""Include"")"
        .Formula = "=IFERROR(VLOOKUP((RC[-32]&"".""&RC[-21]),'Credit Limit Expiry'!C2:C5,4,0),""Error"")"
      End With
   End With
End Sub
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Please provide us with more details.
Are both these formulas supposed to be applied to the exact same cells?

It might be better if you can show us a sample of your data, and explain the logic (in plain English) of exactly what should happen in each scenario.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,215,078
Messages
6,122,997
Members
449,093
Latest member
masterms

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top