• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

finding difference between two cells

hi am very new this excel and vba i need a formula to find the difference between two cells,and it should highlight the two cells based on the output value i have created if statement find the difference and output will be other cell "=IF(I1>=H1,(I1-H1),(I1+10)-H1)"
 

Attachments

  • find difference.xlsx
    9.2 KB · Views: 17
hi i need the out put as coloured not in any cell
in the attached file i have provided the colour manually but i need a formulae or code so that it can find out the difference and highlight the two cells based on the out put example if the difference between two cells is 1 then both cells should be highlighted in red same to the other numbers from 0 to 9
 

Attachments

  • find difference.xlsx
    9.2 KB · Views: 4
maniniinfotech
I tried to ask three basic questions in #3 reply .. I tried.
I got same file back with sentence hi i need the out put as coloured not in any cell
Sorry, but those didn't give nothing new.
Without answers ... I should continue guessing or dig those answers from You
... not good idea.
 
@maniniinfotech
If you are going to get anything more from this exchange then, as @vletm has said, you need to explain your problem more fully. Can you provide examples of pairs of numbers that have been compared and where the formula should be placed? If we are colouring, could you provide a key to the colour coding?

@vletm
I think I may have made a key breakthrough in understanding the question. I suspect the corresponding cells in the two coloured blocks are to be compared one to the other, possibly by subtraction. Instead of outputting the result to a formula cell the OP requires the original tables to be colour coded.
 

Attachments

  • find difference (PB).xlsx
    12.1 KB · Views: 5
sorry for the inconvenience
if A1=2 ,B1=3 then the difference is 1,

For Example

>>>> Difference number is 1 then A1 and B1 cells should be in red

if A1=4 ,B1=6 then the difference is 2,
>>>> Difference number is 2 then A1 and B1 cells should be in blue

Like wise 0 to 9 each number carry a Color
 
Peter Bartholomew
... maybe or maybe not ...
before answers to my questions ... everything would be only the result of number of wondering.
Where ... ?
How...?
There should be clear rules what to need...
that no need to dig those.
Now, more hmm? ... how something should be red ... blue ... there are many many colors.
 
The still appears room for confusion. What do you mean by A1 and B1? Are they range references, in which case they are adjacent cells, or are they the corresponding cells in your two coloured ranges?

Should 4 and 6 [i.e. +2] be coloured the same as 6 and 4 [i.e. -2] ?
Are 0 and 9 close [like 12 and 1 on a clock-face] or are they as different as you can get?
 
maniniinfotech
sorry for the inconvenience
if A1=2 ,B1=3 then the difference is 1...

Yes ... You should give Your samples from that file ...
A1=0, B1=5 ... also C1=6, D1=9 and so on...
Which two cells should notice, while 'finding differences between two cells'?
There could be many pairs!
 
hi this is the updated file as per my knowledge i have tried to give the information
can i have personal email so that i can mail the whole data as i cannot upload here
 

Attachments

  • find difference update.xlsx
    11 KB · Views: 5
maniniinfotech
it should aumatically check the diferences from one cell to last cell in both tables
'automatically' ... okay
from one cell ... hmm?
'last cell's are F9 & O9
if I input the data or copy into this table 1 then should check given range
Input or copy ... means formulas solution
Ranges are okay.
then it should match the data which is given in table 2
... then everything goes upside down.

There are no clear rules of colors (ref #10reply).

For me, only some details match ...

A sample data should be as near as possible with the real data,
then no need any whole data upload here.


Hint: If You think this and You write that then You'll get this - not that, which You thought. In these cases -.this and that should be same!
 
Last edited:
assign colors to the numbers from 0 to 9 as you wish
as i am unable to explain you clearly. sorry for the trouble causing.
ok let me try to explain you in example as i can

i will be having two sets of data
like table 1 and table 2 as given in the attachment,
i need these both tables (table 1 ,table 2) should be compared
if any data match in both of the tables then those cells should be highlighted in respective positions in the both tables
comparing or matching should be done based on output(the difference)
 
Last edited:
maniniinfotech
1) Are those table1 and table2 now correct? (range A3:O9) ( no matter of colors )
If 'yes' then skip next blue line
if 'no' then You should make that situation to those tables
2) Create new tables below row 15 AND change cell A1 value to any different value,
which shows new situation ( no matter of colors ) after Your change.

Q: Your named 'whole data'
... means that those tables (1&2) are a little bigger or there are something else than numbers from 0 to 9? ... or what?
 
maniniinfotech
1) Are those table1 and table2 now correct? (range A3:O9) ( no matter of colors )
If 'yes' then skip next blue line
yes two tables are the data
since i was confusing you till now
1.search
2.match
3.color
these are required for the two tables
tables contain numbers from 0 to 9 only,
 
Last edited:
maniniinfotech
You wrote something about 1st question...
... so far no matter of those colors ... or as You wrote ... those can be NOW all 'white'.

When do you do answer to 2nd question?
 
maniniinfotech
I checked those two files...
Any of those were something I tried to get.
... I compared with my #17reply.
If You cannot show what would even one change do to ... something ... it's a challenge!
 
maniniinfotech
No need to make video!
1) file which has those two tables (correct)
2) below of those, You show case after You have changes Cell A1 value!
That's all so far!
 
Back
Top