Kenja824
Automotive
- Nov 5, 2014
- 949
I have a couple .bas files someone once made for us to perform certain tasks in excel. I have manipulated them slightly to do things I needed but now I need something I cant figure out.
I was wondering if someone could write the code to do something fairly simple?
The Completed Formula when we add it to the spreadsheet would look something like...
=Weld_Ratio(A1,D1,G1) The three cells would be the cells we select for it to use.
We will pretend that A1= 2.5, D1= 1.0 & G1= 1.0
It would look at the numbers in the three cells and look for particular combinations
1) If the ratio between A1 & D1, or D1 & G1 is more than 3 to 1, it will return "3 to 1 Ratio"
2) If the ratio between the two outside cells A1 & G1 are more than 2 to 1, it will return "2 to 1 Ratio"
3) If the Total of the three cells is larger than 6.0 it will return "6mm Weld exceeded"
So with the numbers listed in the above example cells, since the two outside cells A1 & G1, A1 (2.5) is more than twice the number in G1 (1.0) this formula would return "2 to 1 Ratio"
If multiple infractions are found, I would want it to list all of the infractions.
"2 to 1 & 3 to 1 ratios"
"2 to 1 Ratio & 6mm"
3 to 1 Ratio & 6mm"
2 to 1, 3 to 1, & 6mm"
I am sorry for the trouble if this is a bigger deal than I realize. I am fair with excel formulas but when it comes to these .bas files code, I am nearly as green as they come. All I know is from looking at the couple we have. I do appreciate any help.
I was wondering if someone could write the code to do something fairly simple?
The Completed Formula when we add it to the spreadsheet would look something like...
=Weld_Ratio(A1,D1,G1) The three cells would be the cells we select for it to use.
We will pretend that A1= 2.5, D1= 1.0 & G1= 1.0
It would look at the numbers in the three cells and look for particular combinations
1) If the ratio between A1 & D1, or D1 & G1 is more than 3 to 1, it will return "3 to 1 Ratio"
2) If the ratio between the two outside cells A1 & G1 are more than 2 to 1, it will return "2 to 1 Ratio"
3) If the Total of the three cells is larger than 6.0 it will return "6mm Weld exceeded"
So with the numbers listed in the above example cells, since the two outside cells A1 & G1, A1 (2.5) is more than twice the number in G1 (1.0) this formula would return "2 to 1 Ratio"
If multiple infractions are found, I would want it to list all of the infractions.
"2 to 1 & 3 to 1 ratios"
"2 to 1 Ratio & 6mm"
3 to 1 Ratio & 6mm"
2 to 1, 3 to 1, & 6mm"
I am sorry for the trouble if this is a bigger deal than I realize. I am fair with excel formulas but when it comes to these .bas files code, I am nearly as green as they come. All I know is from looking at the couple we have. I do appreciate any help.