Formula to type YES or NO after compare two cells

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,280
Office Version
  1. 2013
Platform
  1. Windows
Hello,
Is it possible to fix that question with a formula?

Worksheets "info" C2:C11" has datas with reference ID numbers.
D2:G11 has digit number values near that ID numbers.
On another worksheet from the cell W2:W500 there are mixed that ID numbers related from C2:C11
My question is to compare those digits with the other digits from Q2:T500 and put text into the other cells (X2:AA500) as YES or No
if incoming Q2 value higher then any values from the worksheet "info" D2:D11 wich same ref ID number from C2:C11 it will be text as YES on X2 cell.
Many Thanks


Worksheet"info" :

REFERENCEROOM1ROOM2ROOM3ROOM4
Column CColumn DColumn EColumn FColumn G
f123456100,0001005025
f123457200,00020010050
f123458300,00030015075
f123459400,000400200100
f123460500,000500250125
f123461600,000600300150
f123462700,000700350175
f123463800,000800400200
f123464900,000900450225
f1234651,000,0001000500250

<colgroup><col><col><col span="3"></colgroup><tbody>
</tbody>


Worksheet1:

ROOM1ROOM2ROOM3ROOM4REFERENCEROOM1ROOM2ROOM3ROOM4
Column QColumn RColumn SColumn TColumn UColumn VColumnWColumn XColumn YColumn ZColumn AA
399,00040521090 f123459noyesyesno
f123460
f123461
f123462
f123456
f123457
f123458
f123463
f123464
f123465

<colgroup><col><col><col span="3"><col><col span="5"></colgroup><tbody>
</tbody>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try this in X2, then copy across to AA2 then down;


Book1
QRSTUVWXYZAA
1ROOM1ROOM2ROOM3ROOM4REFERENCEROOM1ROOM2ROOM3ROOM4
2399,00040521090f123459NoYesYesNo
3f123460NoNoNoNo
4f123461NoNoNoNo
5f123462NoNoNoNo
6f123456YesYesYesYes
7f123457YesYesYesYes
8f123458YesYesYesYes
9f123463NoNoNoNo
10f123464NoNoNoNo
11f123465NoNoNoNo
Sheet1
Cell Formulas
RangeFormula
X2=IF(VLOOKUP($W2,info!$C$2:$G$11,COLUMNS($W2:X2),0))
<q$2,"yes","no")< html=""></q$2,"yes","no")<>
 
Last edited:
Upvote 0
Thans cool,
Thanks a lot.
How can we keep the cells blank if there is no value at column W cos now if i do not have any values it shows #N/A
 
Upvote 0
Fixed, with IFERROR!
Thanks again.

<q2,"yes","no"),"")[ code]<="" html=""></q2,"yes","no"),"")[>
 
Last edited:
Upvote 0
Hello Again!
Sorry for that but I'm trying to alter some references on my formulas, if I put column W datas to column P
Column Q:T datas to columns U:X
And I want to put the formulas on the cells Y2:AB50
So far I couldn't figure out:)
Thanks
 
Upvote 0
That's the alteration I did done but it says #REF!

CELLFORMULA
Y3=IF(VLOOKUP($P3,info!$C$2:$G$11,COLUMNS($P3:Y3),0)<U$3,"Yes","No")<u4,"q","uq"),"")< td=""></u4,"q","uq"),"")<>

<tbody>
</tbody>
 
Last edited:
Upvote 0
Hi

Copy this into Y2 first then drag across and then down, the COLUMNS($X2:Y2) part counts the columns as you move the formula across but your room data starts in Column 2,3,4,5;


Book1
PQRSTUVWXYZAAAB
1REFERENCEROOM1ROOM2ROOM3ROOM4ROOM1ROOM2ROOM3ROOM4
2f123459399,00040521090NoYesYesNo
3f123460NoNoNoNo
4f123461NoNoNoNo
5f123462NoNoNoNo
6f123456YesYesYesYes
7f123457YesYesYesYes
8f123458YesYesYesYes
9f123463NoNoNoNo
10f123464NoNoNoNo
11f123465NoNoNoNo
Sheet1
Cell Formulas
RangeFormula
Y2=IF(VLOOKUP($P2,info!$C$2:$G$11,COLUMNS($X2:Y2),0))
<u$2,"yes","no")[ code]<u$2,"yes","no")<="" html=""></u$2,"yes","no")[>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,573
Members
449,089
Latest member
Motoracer88

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