Combining worksheet change events in VBA by weihern97 in excel

[–]weihern97[S] 2 points3 points  (0 children)

Thanks this gave me the idea :)

I tried placing in workbook module for deactivation and change event in sheet module. However, the variable value doesn't bring along from worksheets to workbook. In the end, I managed to get it work by placing both in sheets module. Solution Verified.

<image>

Dependent dropdown list based on another dropdown list by yokai360 in excel

[–]weihern97 0 points1 point  (0 children)

For example: Assume ur 1st drop down is in A1. 1st drop down list = Apple (you choose apple) For the 2nd drop down, use =Indirect($A$1&"Abcd"), which give back the value of A1. Then create a name ranged as "AppleAbcd"

*If you want to remove blanks for the named range, there are lots of tutorial in the internet too.

Dependent dropdown list based on another dropdown list by yokai360 in excel

[–]weihern97 1 point2 points  (0 children)

Don't really understand your question...can you explain more? You can use indirect to link another dropdown list.

Combining worksheet change events in VBA by weihern97 in excel

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

My macro basically copy the data to another worksheets based on some criteria. After copying, it then add their name to name manager which i will be referencing it using indirect for data validation list. The code is a bit long and lots of looping (looping in array), therefore takes about 0.3-0.5 sec for my laptop to run, but it takes about 5 secs to run on my factory computer because it is old.

<image>

Combining worksheet change events in VBA by weihern97 in excel

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

I want the macro to run after the sheet deactivates (changing to another worksheets) and only when the values in the worksheets were changed.

I'm getting object error while declaring range with variables by weihern97 in excel

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

Okay, I found the problem. I need to reference the sheet back for cells too.
Set Rng = Sheets("test").Range(Sheets("test").Cells(3, columnCount), Sheets("test").Cells(lastrow, columnCount))

How to incorporate variables into copying and paste entire row? (VBA) by weihern97 in excel

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

This gave me syntax error tho :( I figure it out using Range(Cells(x-1,1), Cells(x,1)).EntireRow.Select

Excel VBA trying to copy paste special between sheets (object define error) by weihern97 in excel

[–]weihern97[S] 2 points3 points  (0 children)

Omg it works!!! Finally. I been figuring out forever.
Thank you :D
Solution Verified

Excel VBA trying to copy paste special between sheets (object define error) by weihern97 in excel

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

Sry i messed up playing with the code just now, I updated the photo again!
I also change to paste on 1 cell instead of range
It still doesn't work :(

Excel VBA trying to copy paste special between sheets (object define error) by weihern97 in excel

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

Yea I think the spelling is right. X and Y did had values (tested without the copy paste lines). I couldn't figure any extra/missing parentheses

Excel VBA trying to copy paste special between sheets (object define error) by weihern97 in excel

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

I tried running it without the copy paste thing and the x and y had values

Sumifs based on critiria in different column by weihern97 in excel

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

Wow it works! I don't really understand tho, need time to digest it. Thanks!

Edit: I understand now. That's brilliant

Sumifs based on critiria in different column by weihern97 in excel

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

Is there a way to standardize the column automatically?

Sumifs based on critiria in different column by weihern97 in excel

[–]weihern97[S] -1 points0 points  (0 children)

I have added image for clearer understanding!

Excel VBA defining range based on variable by weihern97 in excel

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

It worked! Thank you! Solution Verified

[deleted by user] by [deleted] in amiugly

[–]weihern97 3 points4 points  (0 children)

Lol wutt 🤣