Another excel question please
Discussion
Hi, if I wanted to build an if statement into the following, what am I doing wrong?
=A1&(IF B1<1,"Yes",C1)
Hopefully you can see what I'm trying to do? But basically have the content of A1 and, if B1 is less than 1, then Yes, if not, C1.
I'm probably doing this wrong, but if there's an easier way?
=A1&(IF B1<1,"Yes",C1)
Hopefully you can see what I'm trying to do? But basically have the content of A1 and, if B1 is less than 1, then Yes, if not, C1.
I'm probably doing this wrong, but if there's an easier way?
Don't think you can call a Macro with a formula, but it's 2024 and even Microsoft have put VBA in the bin, so bear in mind that there's probably better ways of doing this if you're having to resort to Macros.
If you're going to learn Excel Formulas now, you might as well put Power Query into Google and learn that instead, unless your data is genuinely unstructured, which it won't be, then you'll have far more joy there.
If you're going to learn Excel Formulas now, you might as well put Power Query into Google and learn that instead, unless your data is genuinely unstructured, which it won't be, then you'll have far more joy there.
audi321 said:
Totally separate (but related) question, but is it possible to have a Macro run (called Macro1) instead of the 'Yes'?
Yes, but the macro needs to be a function. For example:Public Function Test() As String
Test = "Function"
End Function
Then in a formula just put
=IF(1>2,"No",Test())
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff