vba, macro, shift down after autofilter

mawar5530

New Member
Joined
Apr 5, 2020
Messages
38
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
Hi Friends,

I am new to vba, really need help to find solution.
After autofilter the selction of "Poitem" example, i want to change G coloumn number beloging to "Poitem" to "zero" value
i dont find any way to offset, because the range keep on changing acording to report, so the offset not working for me.

1586156618873.png
 

Attachments

  • Capture.PNG
    Capture.PNG
    28 KB · Views: 16

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
The formula in the code line that I posted would not have produced the formula that you show in your image.
 
Upvote 0
The formula in the macro would not have produced the formula that you show in your image.

Do you means by the calculation or the code ?

Just want the formula according to cell filter feild
How about if = F24-G24,
 
Upvote 0
The formula in the code was
VBA Code:
.Formula = "=IF(F2=0, ABS(F2-G2),F2-G2)"
it cannot produce =ABS(F2-G2).
It is not possible, you have altered something.
Even if you had the column formatted as text before the code ran the nearest any cell would get to =ABS(F2-G2) is =IF(F2=0, ABS(F2-G2),F2-G2)
 
Upvote 0
The formula in the code was
VBA Code:
.Formula = "=IF(F2=0, ABS(F2-G2),F2-G2)"
it cannot produce =ABS(F2-G2).
It is not possible, you have altered something.
Even if you had the column formatted as text before the code ran the nearest any cell would get to =ABS(F2-G2) is =IF(F2=0, ABS(F2-G2),F2-G2)

Ok that find. i understand.

The issue is now, the formula should read as range F24, instead F2.
Please help me over here, about the formula i will check out.
 

Attachments

  • Capture.PNG
    Capture.PNG
    36.2 KB · Views: 0
Upvote 0
Make sure that column H is formatted as General before running the code.
Other than that then I can't help you as the code doesn't do that for me.
If you are really stuck then upload your workbook to a free file hosting site (either www.box.com or www.dropbox.com), mark it for sharing and paste the link it produces in the thread.
 
Upvote 0
Make sure that column H is formatted as General before running the code.
Other than that then I can't help you as the code doesn't do that for me.
If you are really stuck then upload your workbook to a free file hosting site (either www.box.com or www.dropbox.com), mark it for sharing and paste the link it produces in the thread.

 
Upvote 0
What are you filtering by? Column H is headed as "Planned Date" with dates below is this correct and needs clearing?
Are you sure that you have uploaded the right file?
 
Upvote 0
What are you filtering by? Column H is headed as "Planned Date" with dates below is this correct and needs clearing?
Are you sure that you have uploaded the right file?
Yes.

Column H to insert and later i will change the name is as "balance"
Column "D" filter.

But i have two formula apply in column "H".
 

Attachments

  • Capture.PNG
    Capture.PNG
    106.9 KB · Views: 2
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,017
Members
448,936
Latest member
almerpogi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top