Loops??

panyagak

Active Member
Joined
Feb 24, 2017
Messages
299
Hi everyone.

I have a large excel sheet but interested in 3 columns with over 1,000 rows. e.g
1-1000
A B C
1 56 78
2 32 55
3 65 86
4 72 92
.
.
.
.
1000

All am looking for in a single operation/code, is repeatedly multiply column values in B & C with column A values until they EQUAL & show results e.g take 36 in B & 72 in C: expected answer being 20*36 & 72*10=720; else FALSE or DUMP etc
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
There is no 36 in the small amount of data you've supplied.
And 72 appears to be in column B.
There's also no 20 in the data.


"expected answer being 20*36 & 72*10=720; else FALSE or DUMP etc"
To return the value FALSE you need to compare 720 with something else.
You haven;t said what you're comparing it with.

Perhaps you should check the data again and explain more clearly.

Provide some data where the answer is FALSE and some data where the answer is TRUE.
 
Last edited:
Upvote 0
1st; the example I gave did not come from the values provided BUT was a simple illustration.


i do it using Excel one by one..which is tiresome.

i think you didnt get exactly my problem: you have 2 sets of different values in 2columns. next multiply both sets separately with 1,2,3..even up to 2000.

what am begging the code to do is: DISPLAY at what no. do these values equal! lets forget FASLSE; DUMP

WHAT I DO IN EXCEL:
Add column D for =B*1 & E for column =C*1: drag the formulas downwards up to even 2000. Copy & paste special into columns F & G, then fill each with Green & Red: next cut values in column F & paste on the cell after the last cell in column G. Then sort all values NOW UNDER column G smallest to largest: it has now green & red mixed up!!
Then next on column H above the 1st cell in column G click =cell below 1st cell minus 1st cell. Repeat the formulaon 2nd cell still in column H then Autofill. Copy & paste special H, values.
Copy all columns from A to H, then sort by column H.

AM ONLY LOOKING OUT FOR 0.00 & am setttled!!

My quizz understood?

Now, i merely wanted a code to do that
 
Upvote 0
"Provide some data where the answer is FALSE and
some data where the answer is TRUE."

If I provide the data, I will in effect be answering my quizz, whose answer am seeking???!!
 
Upvote 0
"the example I gave did not come from the values provided BUT was a simple illustration."
...along with a description of specific values that you DID NOT supply anywhere (juist to confuse things).

The proper way to post on here is to present some examples of data and a description THAT REFLECTS THAT DATA.
Providing data and then specifying other data that we can't see just confuses things.

Here's a link to the guidelines for posting
https://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html

It includes the phrase "provide some sample data" and "actual data" (5b).

"Now, i merely wanted a code to do that"
You're implying a VBA solution. I'm neither an expert nor have the time to write this so I am more than happy to let someone else solve this.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

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