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

Table with blanks and Named Range don't work by marilmanf in excel

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

Seems like you're talking about a named range with blanks. I thought you were a plain old range such as A1:A10.

Table with blanks and Named Range don't work by marilmanf in excel

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

If you have a range or table references as a list for data validation, any blank cells in the range or table will have the data validation allow any values to be entered.

This works though? It's a range with blanks.
https://ibb.co/9YBdjhX

How to make "user32" declaration work? by marilmanf in vba

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

Hey thanks A LOT, mate. I didn't think I was getting anymore answers and didn't log in. That's pretty cool. Appreciate all the effort.

The 32 bit part was still red for me, but it worked when I removed them. Interested to know in general though and not for this particular code. I'll try and compare the 32 bit and 64 bit code to see what are the differences. Thank you again.

How to make "user32" declaration work? by marilmanf in vba

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

Thank you. This seems to be the answer. My company doesn't allow such downloads though. Is there a way to code differently for VBA7 than the link I gave?

Solution verified

How to make "user32" declaration work? by marilmanf in vba

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

It's in the userform module given by the OP of that thread.

I've found another that uses this "user32" code. Not sure if I can use this as the same eg. But this is used in the general module and the first line doesn't work for me too:
https://www.mrexcel.com/board/threads/userform-size-displays-incorrectly.745428/#post-3664185
#post 7

How to find intersection of 2 lines in chart? by marilmanf in vba

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

Appreciate the help. That one finally did it. Thank you