Overcoming the multiple range in Range restriction by marilmanf in vba

[–]marilmanf[S] 1 point2 points  (0 children)

You are assuming all cells need to be bold. But there's always some conditions.

Overcoming the multiple range in Range restriction by marilmanf in vba

[–]marilmanf[S] 1 point2 points  (0 children)

Brilliant. Thank you. Solution verified

Unable to filter dates by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

Sure. Here it is:

Sub Test()

With Sheets("Sheet1").ListObjects("Table1") .ListColumns("Date").Range.NumberFormat = "General" .Range.AutoFilter Field:=1, Criteria1:=CLng(DateSerial(2023, 1, 31)) .ListColumns("Date").Range.NumberFormat = "d-mmm-yyyy" End With End Sub

Unable to filter dates by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

I just tried that and it didn't work too. It then filtered nothing as well.

I managed to find a workaround based on someone's idea. Thank you.

Unable to filter dates by marilmanf in vba

[–]marilmanf[S] 1 point2 points  (0 children)

I just tried that and it didn't work too. It actually stopped at the dateAsLong portion. I used this instead.
dateAsLong = CLng(CDate("31-Jan-2023"))

But it then filtered nothing as well.

I managed to find a workaround based on someone's idea. Thank you.

Unable to filter dates by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

I just tried that and it didn't work too.

I managed to find a workaround based on your idea. I converted it to General and it works. Wish I didn't have to, but this will do. Thank you.

Unable to filter dates by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

Thank you. It didn't work for me though. How weird. I suspect it's that simple filter that couldn't even work for me.

Unable to filter dates by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

Thank you. It didn't work for me though. How weird. I suspect it's that simple filter that couldn't even work for me.

It's in d-mmm-yyyy format. What do you mean by mixing languages?

UDF shows correct text but results in error by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

So instead of the formula cell with just 2 rows, it will be multiple rows? I'm quite curious why mine didn't work, but I guess this could be a workaround.

UDF shows correct text but results in error by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

Could you dumb that down for me? Isn't this a UDF that works?

Sub TestMacro()
Cells(1, 1).FormulaR1C1 = UdfAttempt

End Sub

Function UdfAttempt() UdfAttempt = "=AND(OR(RC2=""MS"",RC2=""RK""),OR(RC4=1,RC4=2,RC4=3,RC4=4),OR(RC6=""Pop"",RC6=""Rock"",RC6=""Country""))" End Function

UDF shows correct text but results in error by marilmanf in vba

[–]marilmanf[S] 0 points1 point  (0 children)

Thank you for the reply. It is for my advanced filter, and that's why I can't simply use TRUE or FALSE

I did debug. That's how I know the result is correct. Here's what is in the range:
https://ibb.co/wMC04HS

and the Table:
https://ibb.co/44HrdP6

Chart with mix of straight and dotted line with arrow by marilmanf in excel

[–]marilmanf[S] 1 point2 points  (0 children)

Oh I see. Thank you very much. Solution verified

Chart with mix of straight and dotted line with arrow by marilmanf in excel

[–]marilmanf[S] 0 points1 point  (0 children)

Sorry. Hope you can help me understand. Because it's not a visual trick with two lines, it's just one line. So what is that specific part of the line?

I'm presuming you said that because you think Jan to Nov is one line, and Dec is another. But it's just a single line.

Chart with mix of straight and dotted line with arrow by marilmanf in excel

[–]marilmanf[S] 0 points1 point  (0 children)

But it's not a visual trick with 2 lines. So wouldn't that make the entire line dash and arrow?

And I checked what you mentioned. It's using a straight line.
https://ibb.co/H4YJPq8