add formula

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Add the formula

Add the formula

resolvedResolved · Urgent Priority · Version 365

Sanjay has attended:
Excel VBA Introduction course
Excel VBA Intermediate course

Add the formula

Hi,


Currently I have a formula which is given below .

=IFERROR(VLOOKUP($D31,CPERepLookup,20,TRUE),"")

Now I have to add one more condition here and the confdition is that "if the value in column H is "Managed Asset Service" then value will be empty in the box".

please let me knwo how we can add this condition in to the existing formula.


Thanks & Regards,
Sanjay Sharma

RE: add the formula

Hi Sanjay,

Thank you for the forum question.

Are you sure this is a VBA question?

Try




=IFERROR(if($H31= "Managed Asset Service","",VLOOKUP($D31,CPERepLookup,20,TRUE),""))

If you are looking for a VBA solution you will have to use a If decision code.



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: add the formula

Please first state which Training Course this forum post is about:

Giving me error "You've entered too many arguments for this function"

RE: add the formula

Hi Sanjay,

Sorry try:

=IFERROR(IF($H31= "Managed Asset Service","",VLOOKUP($D31,CPERepLookup,20,TRUE)),"")

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: add the formula

Please first state which Training Course this forum post is about: Thanks...its working fine

Thank you very much for your support

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Colouring cells containing formulas

Cells in a worksheet can contain values or they can contain formulas. You may wish to identify all the cells in your worksheet that contain formulas by colouring those cells.

Follow these steps:
1. Choose Edit > Go To menu, or press either F5 or Ctrl+G. Excel displays the Go To dialog box.
2. Click Special. Excel displays the Go To Special dialog box.
3. Select the Formulas radio button option.
4. Select OK.

At this point, every formula cell in the worksheet is selected, and those cells can be coloured formatted as desired.

View all Excel hints and tips


Server loaded in 0.07 secs.