Re: VBA Code Translation
From: Melanie Breden (Melanie.BredenNOSPAM_at_mvps.org)
Date: 03/17/04
- Next message: Ladislav Ligart: "Re: Application.NetworkTemplatesPath Not Working"
- Previous message: Claude: "expand or collapse specific rows in outline"
- In reply to: Q: "VBA Code Translation"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 17:21:42 +0100
Hi Q,
Q wrote:
> hi.
> how can i say the following in VBA Code:
> If A1 = B1 then use the phrase "Limitation of Costs" in
> cell C15 else (if they're not equal) use the
> phrase "Limitation of Funds" in cell C15. thanks very
> much in advance.
this Syntax is a little bit shorter:
Range("C15").Value = "Limitation of " & _
IIf(Range("A1").Value = Range("B1").Value, "Costs", "Funds")
-- Regards Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook)
- Next message: Ladislav Ligart: "Re: Application.NetworkTemplatesPath Not Working"
- Previous message: Claude: "expand or collapse specific rows in outline"
- In reply to: Q: "VBA Code Translation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|