MSGBOX WHEN A CELL MEETS 2 CONDITIONS

leobrice

New Member
Joined
Jun 14, 2024
Messages
37
Office Version
  1. 2013
Platform
  1. Windows
Hello MrExcel friends, good evening.

I wanted to ask for your help. It is possible to put an alert through a MSGBOX WHEN A CELL MEETS 2 CONDITIONS, I explain:

In the Excel file calculates costs of imported products and I want to alert the user through a MSGBOX that when NO is placed in column V of an existing product and the value of column U is greater than zero (0.00), a MSGBOX is activated. The file has 10,000 rows, and the MSGBOX should be triggered only in the case described above.

Thank you

Translated with DeepL.com (free version)

CALCULADORA DE PRECIOS Y COSTOS DATCHEL PLUS1ADDXXXXXX - Copy (2).xlsm
ACDEFGHIJKLMNOPQRSTUVWX
1Nombre de la Empresa en Módulo Información General
2COSTOS DE PRODUCTOS Y SERVICIOS IMPORTADOS
3PRODUCTOUNIDAD DE MEDIDA (seleccionar)PAÍS DE ORIGENMONEDACANTIDAD DE PRODUCTOCOSTO POR UNIDADTIPO DE CAMBIOTOTAL COSTO PRODUCTOARANCELESIMPUESTOSSEGUROSGASTOS DE NACIONALIZACIÓNTRANSPORTE NACIONALFLETESALMACENAJE O DEPÓSITOOTROS CONCEPTOS 1OTROS CONCEPTOS 2OTROS CONCEPTOS 3OTROS CONCEPTOS 4TOTAL COSTO PRODUCTO NACIONALIZADOCONFIRMAR REGISTROS NUEVOS Y MODIFICACIONESCOSTO PRODUCTO UNITARIO
4IMPORTADO(SI / NO)
5IMPORTADO AKiloESTADOS UNIDOSU$125,005,15540,00347.625,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,00347.735,00SI2.781,88por Kilo
6IMP AKiloESTADOS UNIDOSU$100,003,15540,00170.100,0010,0010,0010,0010,0010,0010,0010,0010,0010,0020,0010,00170.220,00SI1.702,20por Kilo
7IMP BKiloESTADOS UNIDOSU$150,004,20540,00340.200,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00340.860,00SI2.272,40por Kilo
8IMP CKiloESTADOS UNIDOSU$200,003,20540,00345.600,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00346.260,00SI1.731,30por Kilo
9IMP DKiloESTADOS UNIDOSU$250,005,50540,00742.500,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00743.160,00SI2.972,64por Kilo
10IMP EKiloESTADOS UNIDOSU$300,006,00540,00972.000,0010,0020,000,0040,0050,0060,0070,0080,0090,00100,00110,00972.630,00SI3.242,10por Kilo
11IMP FKiloESTADOS UNIDOSU$600,007,15540,002.316.600,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,002.000.000,004.317.150,00SI7.195,25por Kilo
12IMP GKiloESTADOS UNIDOSU$350,008,20540,001.549.800,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,001.550.460,00SI4.429,89por Kilo
13IMP HKiloESTADOS UNIDOSU$210,006,54540,00741.697,2410,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00742.357,24SI3.535,03por Kilo
14IMP IKiloESTADOS UNIDOSU$320,008,50540,001.468.800,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,001.469.460,00SI4.592,06por Kilo
15IMP JKiloESTADOS UNIDOSU$321,004,52540,00783.496,8010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00784.156,80SI2.442,86por Kilo
16IMP KKiloESTADOS UNIDOSU$410,005,50540,001.217.700,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,001.218.360,00SI2.971,61por Kilo
17IMP LKiloESTADOS UNIDOSU$350,0012,00540,002.268.000,0010,0020,0030,0040,0050,0060,0070,0080,00909,00100,001.000.000,003.269.369,00SI9.341,05por Kilo
18IMP MKiloESTADOS UNIDOSU$210,008,75540,00992.250,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00992.910,00SI4.728,14por Kilo
19IMP NKiloESTADOS UNIDOSU$120,005,40540,00349.920,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00350.580,00SI2.921,50por Kilo
20IMP OKiloESTADOS UNIDOSU$500,006,00540,001.620.000,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,001.620.660,00SI3.241,32por Kilo
21IMP PKiloESTADOS UNIDOSU$400,007,50540,001.620.000,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00640.000,002.260.550,00SI5.651,38por Kilo
22IMP QKiloESTADOS UNIDOSU$250,005,54540,00747.900,0010,0020,0030,0040,0050,0060,0070,0080,00540.000,0020.000,001.000.000,002.308.260,00SI9.233,04por Kilo
23IMP RKiloESTADOS UNIDOSU$128,003,85540,00266.112,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,0050.000.000,0050.266.662,00SI392.708,30por Kilo
24IMP SKiloESTADOS UNIDOSU$200,004,10527,00432.140,0010,0020,0030,0040,0050,0060,0070,001.000.000,0090,00100,0025.400,001.458.010,00SI7.290,05por Kilo
25IMP TKiloESTADOS UNIDOSU$175,005,65600,00593.250,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,002.000.000,002.593.800,00SI14.821,71por Kilo
26IMP UKiloESTADOS UNIDOSU$200,008,45530,00895.700,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00896.360,00SI4.481,80por Kilo
27IMP VUnidadESTADOS UNIDOSU$320,006,75530,001.144.800,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,002.000.000,003.145.350,00SI9.829,22por Unidad
28IMP WDocenaESTADOS UNIDOSU$100,005,50530,00291.500,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,00292.160,00SI2.921,60por Docena
29IMP XKiloESTADOS UNIDOSU$10,008,00530,0042.400,0010,0020,0030,0040,0050,0060,0070,0080,0090,00100,00110,0043.060,00SI4.306,00por Kilo
30U$0,000,00NO0,000
31U$0,000,00NO0,000
32U$0,000,00NO0,000
33U$0,000,00NO0,000
34U$0,000,00NO0,000
35U$0,000,00NO0,000
36U$0,000,00NO0,000
COSTOS PRODUCTOS IMPORTADOS
Cell Formulas
RangeFormula
A1A1='INFORMACION GENERAL'!D5
J4J4=MONEDAS!C2
K4K4=MONEDAS!C2
L4L4=MONEDAS!C2
M4M4=MONEDAS!C2
N4N4=MONEDAS!C2
O4O4=MONEDAS!C2
P4P4=MONEDAS!C2
Q4Q4=MONEDAS!C2
R4R4=MONEDAS!C2
S4S4=MONEDAS!C2
T4T4=MONEDAS!C2
W4W4=MONEDAS!C2
W5:W36W5=IF(V5="SI",IFERROR(U5/F5,0),0)
X5:X36X5=C5
I4I4=MONEDAS!C2
I5:I36I5=F5*G5*H5
U4U4=MONEDAS!C2
U5:U36U5=SUM(I5:T5)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
X5:X10000Cell Value=0textNO
Cells with Data Validation
CellAllowCriteria
A5:B10000Custom=CONTAR.SI($A$5:$A$10000;A5)<=1
C5:C10000List=UNIDADES
D5:D10000List=PAISES
E5:E10000List=MONEDAS
U5:U10000Any value
V5:V10000Custom=(O(V5="SI";V5="NO"))
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Highlight the data you want to monitor, U2:U whatever. The highlighted cell is where the data validation formula will go.
1725596520840.png

Instead of U1 and V1 us U5 and V5 if that is where your data starts. Then if anyone puts a No and there is a value an error alert will pop up. Change your error alert to whatever you want to see.
1725596599949.png
 
Upvote 0
@dermie_72 did you try that solution? Column U contains a formula and will update without triggering the data validation.
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,157
Members
452,615
Latest member
bogeys2birdies

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