English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have an excel spreadsheet of many numbers, and I want to find which of those numbers numbers add up to a certain number. For a simple example, lets say the excel spreadsheet has the numbers 5, 7, and 9.....if I enter in "12"..I would like it to somehow highlight the cells with the 5 and the 7. If this is not possible, is there any other software that could do this?

2007-01-26 11:24:30 · 4 answers · asked by jeremy283 2 in Computers & Internet Software

4 answers

You would need a bucket-load of IF statements, or a macro.
Every cell needs to be compared with another cell, to see if it's a match.

And what if there's more than one match? Think of the numbers 1, 2, ...8, 9 as the series, and have 10 as your target. EVERY number would match up! 1+9, 2+8, etc.

2007-01-26 11:36:44 · answer #1 · answered by Alan 6 · 1 0

Use the formula button in excel to highlight the numbers you want to work with. Excel is a very powerful spreadsheet program and is capable of doing whatever it is you want to do. One simple formula to use is: SUM=(1A:1B) which adds up cell 1A & 1B and puts it in the cell you designate. Try using the help button in Excel to accomplish what you are trying to do.

2007-01-26 19:32:19 · answer #2 · answered by Anonymous · 0 1

Yes you can do this in Excel. Here's how I did it.

In row 1, I put these labels in separate cells A1 through F1:

FirstSecondSumMatchCompareCount_Match

In cell A2 this formula: =INT (RANDBETWEEN (1, 100))
In cell B2 this formula =INT (RANDBETWEEN (1, 100))

I did this just to produce random numbers to test with. You can use whatever numbers you want. I copied down cells A2 & B2 down to row 101 to give me 100 possible combinations to sum.

In cell C2 this formula =INT (A2+B2)
Copy cell C2 down to row 100

In cell D2 this formula =IF ($E$2=C2, "Match", "No Match")
Copy cell D2 down to row 100

In cell E2, no formula. This is where I can type the number I want used in comparisons.

In cell F2, this formula =COUNTIF (C2:C101, E2)

In Cells A2 through C101, I put in conditional formatting. Highlight the cells A2 through C101, click FORMAT, choose CONDITIONAL FORMATTING. In pop up, choose FORMULA IS and paste in this formula =$D2="Match". Then click on FORMAT button and choose the patterns tab so you can select a color you want the cell to appear.

That's it. Now you can test entering various numbers in cell E2 and watch how the Match_Count changes and highlighted cells appear as matches are detected.

Now obviously the above exercise is not going to match exactly the same conditions and numbers you are dealing with. However, I hope it helps to demonstrate techniques and how to organize your data. Just remember, there are no magic formulas, you must think logically and organize you data set in such a way that you can use formulas to produce desired results.

I hope this helps
Kind Regards,
QwertyKPH @ Yahoo

2007-01-28 09:07:03 · answer #3 · answered by qwertykph 4 · 0 0

Yes it's possible, but it will be convoluted.

2007-01-26 19:28:28 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers