Help with VBA Problem

  • Thread starter Thread starter Legacy 176914
  • Start date Start date
L

Legacy 176914

Guest
Hey all,

I was wondering if you anyone could help me solve this problem. Here is the description:


You have a spreadsheet with account information on customers. You have three columns: 1) The customerID 2) Amount the customer owes 3) The amount the customer has already paid.

I need to write a vb script that will find the difference between what the customer has paid and what the customer still owes, and if that value is above $1000, paste it in a separate worksheet. I also need to past the corresponding customerID next to it.

Any thoughts? Thanks in advance.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
you can have a spread solution.

the sample data is like this
cust owes paid balance
a 3799 3799 0
s 2751 745 2006
d 4997 4900 97
f 1193 100 1093

the column D is introduced(balance)
D2 has formula
=B2-C2
D2 is copied down

cursor to A1
click data(menu)-filter-autofilter
there will be arrows in all the four column headings
click the arrow in column D

in the left window (click the small arrow)
choose greater than equal to
on the right window type
1000
click ok at the bottom

you will have filtered rows (two only)
highlight the filtered data and copy paste in any other location

again cursor to A1
click data-filter-autofilter
the autofilter mode will be removed.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,753
Members
452,940
Latest member
rootytrip

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