VBA - Find Missing Value and List in separate sheet

tommiexboi

New Member
Joined
Apr 24, 2017
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone!

Purpose
I'm creating a forecast tool that lists both quantity and price. I need the users to make sure that if they enter a quantity then they need to input a price.

Objective
I want to create a macro where it'll loop through the data and check if there's a quantity there's also a price. If there's no price, then it'll list the Customer, Item Number, and which month it's missing from on a separate sheet.

Example Data:
CustomerItemMonth 1Month 2Month 3Month 1 PriceMonth 2 PriceMonth 3 Price
XABC-12350100200$5.00$3.00$0.00
ZXYZ-45610050100$0.00$1.00$0.00

<tbody>
</tbody>

Result in separate sheet:
CustomerItemMonth
XABC-123Month 3
ZXYZ-456Month 1
ZXYZ-456Month 3

<tbody>
</tbody>

Need Help:
I have tried to look through the vast amount of information on the internet, however; this specific case seems hard to find. Is there a way I can create a macro to do this or a formula that can replicate this?

Any help or direction will be greatly appreciated!
Thank you
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Do you really only have three months worth of data or did you simplify your question for us? If the latter, please show us the complete header list (we don't need to know the prices, just the actual data layout).
 
Upvote 0
Do you really only have three months worth of data or did you simplify your question for us? If the latter, please show us the complete header list (we don't need to know the prices, just the actual data layout).

Hi Rick,

I simplified it as the data is quite large, but the complete header looks like below.

The months with "actual's" are historical data that I'm pulling from a different table, but the months without the "actuals" are the cells that the user needs to enter.

Hope this helps
QuantityASP
CustomerItem NumberProduct TypeEnd CustomerNotesJun'17 ActualsJul'17 ActualsAug'17 ActualsSep'17 ActualsSep'17Oct'17Nov'17Dec'17Jan'18Feb'18Mar'18Apr'18May'18Jun'18Jun'17 ActualsJul'17 ActualsAug'17 ActualsSep'17 ActualsSep'17Oct'17Nov'17Dec'17Jan'18Feb'18Mar'18Apr'18May'18Jun'18

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,165
Messages
6,123,390
Members
449,098
Latest member
ArturS75

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