How to set index in combo box to newly inserted item
I have the following code:
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If categoryString = "New" Then
newCategoryString = InputBox("Enter new category name", "New Category")
ComboBox2.Items.Add(newCategoryString)
categoryString = ComboBox2.SelectedItem
End If
End Sub
The combobox has the following collection of items
Business
Personal
Home
Vehicle
Social
New
When the user selects New, the msgbox pops up and the user enters the new category. After choosing, the selected item defaults to New. How can I determine the index of the newly inserted item? I am using VB 2008 Express.
Best regards,
Randy Boulter
Hi
Here is my take on the question. This inserts the new item above the last item("New"), and gets the index accordingly. This keeps the "New" item at the bottom of the list.
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged
Dim cb As ComboBox = DirectCast(sender, ComboBox)
If cb.SelectedItem.ToString = "New" Then
Dim newCategoryString As String = InputBox("Enter new category name", "New Category")
cb.Items.Insert(cb.SelectedIndex, newCategoryString)
Dim newitemindex As Integer = cb.Items.IndexOf(newCategoryString)
End If
End Sub
Regards Les, Livingston, Scotland
Similar Messages
-
How can I make the combo box turn to the value of black.
When the show button is pressed (and not before), a filled black square should be
displayed in the display area. The combo box (or drop down list) that enables the user to choose the colour of
the displayed shape and the altering should take effect immediately.When the show button is pressed,
the image should immediately revert to the black square, the combo box should show the value that
correspond to the black.
Now ,the problem is: after I pressed show button, the image is reverted to the black square,but I don't know
how can I make the combo box turn to the value of black.
Any help or hint?Thanks a lot!
coding 1.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class test extends JFrame {
private JPanel buttonPanel;
private DrawPanel myPanel;
private JButton showButton;
private JComboBox colorComboBox;
private boolean isShow;
private int shape;
private boolean isFill=true;
private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
"green", "lightgray", "magenta", "orange",
"pink", "red", "white", "yellow"}; // color names list in ComboBox
private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
Color.gray, Color.green, Color.lightGray, Color.magenta,
Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
public test() {
super("Draw Shapes");
// creat custom drawing panel
myPanel = new DrawPanel(); // instantiate a DrawPanel object
myPanel.setBackground(Color.white);
// set up showButton
// register an event handler for showButton's ActionEvent
showButton = new JButton ("show");
showButton.addActionListener(
// anonymous inner class to handle showButton events
new ActionListener() {
// draw a black filled square shape after clicking showButton
public void actionPerformed (ActionEvent event) {
// call DrawPanel method setShowStatus and pass an parameter
// to decide if show the shape
myPanel.setShowStatus(true);
isShow = myPanel.getShowStatus();
shape = DrawPanel.SQUARE;
// call DrawPanel method setShape to indicate shape to draw
myPanel.setShape(shape);
// call DrawPanel method setFill to indicate to draw a filled shape
myPanel.setFill(true);
// call DrawPanel method draw
myPanel.draw();
myPanel.setFill(true);
myPanel.setForeground(Color.black);
}// end anonymous inner class
);// end call to addActionListener
// set up colorComboBox
// register event handlers for colorComboBox's ItemEvent
colorComboBox = new JComboBox(colorNames);
colorComboBox.setMaximumRowCount(5);
colorComboBox.addItemListener(
// anonymous inner class to handle colorComboBox events
new ItemListener() {
// select shape's color
public void itemStateChanged(ItemEvent event) {
if(event.getStateChange() == ItemEvent.SELECTED)
// call DrawPanel method setForeground
// and pass an element value of colors array
myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
myPanel.draw();
}// end anonymous inner class
); // end call to addItemListener
// set up panel containing buttons
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
buttonPanel.add(showButton);
buttonPanel.add(colorComboBox);
JPanel radioButtonPanel = new JPanel();
radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
Container container = getContentPane();
container.setLayout(new BorderLayout(10,10));
container.add(myPanel, BorderLayout.CENTER);
container.add(buttonPanel, BorderLayout.EAST);
setSize(500, 400);
setVisible(true);
public static void main(String args[]) {
test application = new test();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
coding 2
import java.awt.*;
import javax.swing.*;
public class DrawPanel extends JPanel {
public final static int CIRCLE = 1, SQUARE = 2;
private int shape;
private boolean fill;
private boolean showStatus;
private int shapeSize = 100;
private Color foreground;
// draw a specified shape
public void paintComponent (Graphics g){
super.paintComponent(g);
// find center
int x=(getSize().width-shapeSize)/2;
int y=(getSize().height-shapeSize)/2;
if (shape == CIRCLE) {
if (fill == true){
g.setColor(foreground);
g.fillOval(x, y, shapeSize, shapeSize);
else{
g.setColor(foreground);
g.drawOval(x, y, shapeSize, shapeSize);
else if (shape == SQUARE){
if (fill == true){
g.setColor(foreground);
g.fillRect(x, y, shapeSize, shapeSize);
else{
g.setColor(foreground);
g.drawRect(x, y, shapeSize, shapeSize);
// set showStatus value
public void setShowStatus (boolean s) {
showStatus = s;
// return showstatus value
public boolean getShowStatus () {
return showStatus;
// set fill value
public void setFill(boolean isFill) {
fill = isFill;
// set shape value
public void setShape(int shapeToDraw) {
shape = shapeToDraw;
// set shapeSize value
public void setShapeSize(int newShapeSize) {
shapeSize = newShapeSize;
// set foreground value
public void setForeground(Color newColor) {
foreground = newColor;
// repaint DrawPanel
public void draw (){
if(showStatus == true)
repaint();Hello,
does setSelectedIndex(int anIndex)
do what you need?
See Java Doc for JComboBox. -
How I can stop the combo box with list of values from fireing validations
Hi I'm using Jdeveloper 11.1.2.3.0
Using Hr Schema employees table
I Display employees data in af:table
and I make List Of values on Department_id filed to easy change the employee department
and another one on Job_id filed
and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
the problem is when I Select a value from department or jobs ( combo box with list of values )
fires the entire filed validations for mandatory atributes
Note : the af:table Property ( contedelivery) is set to (immediate )
How I can stop the combo box with list of values from fireing validationscheck it out.,
http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html -
How do you add a combo box into a Jfilechooser?
how do you add a combo box into a Jfilechooser?
thanksSee the API For JFileChooser
public void setAccessory(JComponent newAccessory)Extend a JPanel or Such like, put your Combo Box on it, fiddle around with event handling code for the ComboBox..
Set an Instance of that as The Accessory for the JFileChooser.
Look In Your Docs:-
<JAVA_HOME>/Demo/jfc/SwingSet2/src , unpack SwingSet2.jar if neccessary
In there is a demo of using A JFileChooser with an accessory Panel, and Source code that is adaptable... -
How to set index to tables?
Hi,
My database is having more than 50000 tables, I would like to set index to all my tables, please suggest me how to set index to 50000 tables...?
Thanks
Giriuser10737570 wrote:
Hi,
My DB version 10.2.0.3.0 running on IBM-AIX....Thanks for it
As is said earlier my DB consist of 50k tables.
Each table consist of millions of rows.
So, while I try to access some rows, It takes more time (especially while running long query)
Now I decided to set index to the tables by giving
create index fbind on fdtab(owner);
so that an index has been created with taking nearly 5 hours.
so there are thousands of tables left to set the index.....Its an utterly bad idea to create indexes assuming that their presence will make the queries faster. The data selection, predicates, conditions, statistics of the tables, good/bad sql and lastly, optimizer issues, they all play a very important role in the performance. Just assuming that with index creation , your queries will be faster, I don't think its a reasonable thought to have. You have got a lot of tables as per your saying , it would take huge resource and time to create indexes on all of the tables. In addition to this issue, not all the tables would be requiring the similar type of indexes as well. Some may require B-tree while others may rquire Bitmap. Also , you must note that indexes will make dmls more slower. So Ishall again suggest that you benchmark the creation of indexes with a little more care.
HTH
Aman.... -
How do I make a combo box in LabVIEW 6.1?
I have found reference to the combo box on this site, but it is not in the LabVIEW help for 6.1. Is there a custom VI I can use?
Thanks,
SteveThe combo box was introduced with LabVIEW 7 and is a special type of string control. Prior to 7, everyone used either a ring or enum control. These are all numeric controls and in order to get the string value of the selected item, you have to use the Strings[] property and use the value of control to index the string array. I've attached a 6.1 VI that shows the different controls and how to index the string value to use them in a case statement. For connection to a case statement, it is not required to get the string value - it can be wired directly to the selector.
Attachments:
ring_controls.vi 37 KB -
How to populate the second combo box by depending on the selection in 1st?
I have two combo boxes, both of data in the lists come from the database. The list in the second will be changed when the selection is changed in the first one. I am trying to do query again in the ActionPerform function, unfortunately the list in second one doesn't change.
I am learning Swing now, I really appreciate for any suggestions!
Thankscamickr,
I have another question for the tab pane. Now I have to remove the tab and add tab for updating the tab pane. I wonder if there is other way to do it. I really appreciate your help!
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import java.net.URL;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
public class test_tabpane extends JPanel implements ActionListener {
private JPanel MainPane;
private JComboBox combobox2;
private JTabbedPane TabbedPane;
private JComponent panel1;
private JComponent panel2;
private String [] resources ={"ZZAA", "ZZAB", "ZZAC", "ZZAD"};
private String selected_resource = "";
public test_tabpane() {
MainPane = new JPanel();
MainPane.setOpaque(true);
MainPane.setPreferredSize(new Dimension(600, 70));
MainPane.setBorder(BorderFactory.createRaisedBevelBorder());
combobox2 = new JComboBox(resources);
combobox2.addActionListener(this);
MainPane.add(combobox2);
add(MainPane);
UIManager.put("TabbedPane.tabInsets", new Insets(5,5,5,5));
TabbedPane = new JTabbedPane();
panel1 = makeTextPanel(resources[0]);
TabbedPane.addTab("Language/Notes", panel1);
panel2= makeTextPanel(resources[0]);
TabbedPane.addTab("Relations/Coverage", panel2);
TabbedPane.setPreferredSize(new Dimension(600, 340));
TabbedPane.setFont(new Font("ariel", Font.BOLD, 11));
TabbedPane.setSize(600, 340);
add(TabbedPane);
protected JComponent makeTextPanel(String text) {
JPanel panel = new JPanel(false);
JLabel filler = new JLabel(text);
filler.setHorizontalAlignment(JLabel.CENTER);
// panel.setLayout(new GridLayout(1, 1));
panel.add(filler);
return panel;
public void actionPerformed(ActionEvent e) {
JComboBox cb = (JComboBox)e.getSource();
if ("comboBoxChanged".equals(e.getActionCommand()))
// if ("comboBoxEdited".equals(e.getActionCommand()))
// System.out.println("in action:" + (String)cb.getSelectedItem());
String selected_string = (String)cb.getSelectedItem();
StringTokenizer st = new StringTokenizer(selected_string, "|");
selected_resource = st.nextToken();
updateTabbedPanes(selected_resource);
protected void updateTabbedPanes(String selected_string) {
panel1 = makeTextPanel(selected_string + " in Language/Notes");
int index = TabbedPane.indexOfTab("Language/Notes");
TabbedPane.remove(index);
TabbedPane.insertTab("Language/Notes", null, panel1, "", index);
panel2 = makeTextPanel(selected_string + " in Relations/Coverage");
index = TabbedPane.indexOfTab("Relations/Coverage");
TabbedPane.remove(index);
TabbedPane.insertTab("Relations/Coverage", null, panel2, "", index);
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
private static void createAndShowGUI() {
JFrame.setDefaultLookAndFeelDecorated(false);
//Create and set up the window.
JFrame frame = new JFrame("test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
JComponent ContentPane = new test_tabpane();
ContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(ContentPane);
//centers a frame onscreen // it is a problem for wide screen
// frame.setLocationRelativeTo(null);
frame.setLocation(300, 120);
frame.setSize(1024, 768);
frame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
//Display the window.
frame.pack();
frame.setVisible(true);
* @param args
* This is main function.
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
} -
How do you use the combo box to populate a text box
I am a beginner when it comes to Java Script. I have viewed many different discussions, look at a lot of "help" articles dealing with Acrobat 9 and Java Script, but only to be left confused and dazed. I am hoping someone will be able to tell me how to write a script that will populate a text box that is on my form with the combo box selection's export value...
ThanksIf you want the text box to be read-only, just set it up with the following custom calculate script:
// Set this field value to the value of the combo box
event.value = getField("combo1").value;
but replace "combo1" with the actual name of the combo box field.
If you want something else, post again with more information. -
How do I populate one Combo box based on input from another
Hi,
I have a dynamic Combo box populated from a database. Now I want to use the onChanged event to dynamically populate a second combo box on the same page.
Any ideas on how to do this?
Robert
[email protected]Here is an example:
let us consider it not coming from the database:
<html>
<head>
<title>New Page 1</title>
<script>
function popSub()
var n = 1;
var mainValue;
mainValue = document.test.main.options[document.test.main.selectedIndex].value ;
if (mainValue=="Age" )
document.test.sub.options[n].value = 'below18';
document.test.sub.options[n].text = 'Below 18';
n = n + 1;
if (mainValue=="Age" )
document.test.sub.options[n].value = 'over18';
document.test.sub.options[n].text = 'Over 18';
n = n + 1;
if (mainValue=="Sex" )
document.test.sub.options[n].value = 'male';
document.test.sub.options[n].text = 'Male';
n = n + 1;
if (mainValue=="Sex" )
document.test.sub.options[n].value = 'female';
document.test.sub.options[n].text = 'Female';
n = n + 1;
</script>
</head>
<body>
<form method="POST" name="test">
<p><select size="1" name="main" onClick="popSub()">
<option value="Age">Age</option>
<option value="Sex">Sex</option>
<option selected>select one</option>
</select></p>
<p><select size="1" name="sub">
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
If it coming from the database then you have to write the javascript function in jsp as follows:
out.println('<script language="JavaScript">');
out.println('function popSub()');
out.println('{');
out.println('var n = 1;');
out.println('var mainValue;');
out.println('mainValue = document.test.main.options[document.test.main.selectedIndex].value ;');
// start one for loop from 1 to record count
out.println('if (mainValue=="' + valuefrom the resultset + '")');
out.println('{');
out.println("document.test.sub.options[n].value = '" + value from the result set +"';");
out.println("document.test.sub.options[n].text = '"+value from the result set+"';");
out.println('n=n+1;');
out.println('}');
// end of the for loop
finish the javascript function using out.println -
How to retrieve data in Combo box?
:mad; I need to do a form for delivery order. Just fill some
personal data and order of product. Inside I have some combo box of
product, but I need save the record into txt file (just once time)
then need to retrieve the data from txt file onto combo box. I have
attached the code, I don't know which part got wrong, anybody who
get help me?"roy16" <[email protected]> wrote in message
news:[email protected]...
>
I need to do a form for delivery order. Just fill
some personal data
> and
> order of product. Inside I have some combo box of
product, but I need
> save the
> record into txt file (just once time) then need to
retrieve the data from
> txt
> file onto combo box. I have attached the code, I don't
know which part got
> wrong, anybody who get help me?
>
> Combo box code :
> controls := wcGetControlList()
> listing := "Choose an Item"^Return^"Hot
> Chocholate"^Return^"Tea"^Return^"Coffee"^Return^"Low fat
> Milk"^Return^"Full
> Cream Milk"^Return^"Orange Juice"^Return^"Purified
Water"
> id_list := wcDisplayControl(350, 350, 150, 21,
"ComboBox", "wcS")
> propList := wcGetPropertyList(id_list)
>
>
> Save the data from Combo box list :
> data := wcGetPropertyValue(id_list, "value")^Return
data at this point will be some number between 0 and 7 and
your appended
return.
> WriteExtFile("list2.txt", data)
>
> Read the data from txt :
> data := ReadExtFile("list2.txt")
This will again be a string that contains a number and a
return.
> Convert string to list :
> id_list := [:]
Before, you are populating id_list with a single number that
is the _ID_ of
the winCtrl . Now, you are changing it to an empty property
list. Why?
> AddProperty(data^id_list,controls ,GetLine(data,1))
The first parameter of AddProperty is supposed to be the name
of a variable
which is a property list. As such, you couldn't use a
concatenated
expression there. Even if you could, an Authorware variable
cannot begin
with a number, which data always will in this instance. It
also cannot
contain a return. _And_ the characters "[:]" are not valid
parts of a
variable name either. Next, you're trying to add a property
that looks
something like:
"Button\rCheckBox\rCheckListBox\rColorCombo\rComboBox\rDriveCombo\rEdit..."
While a property list _can_ have strings instead of symbols
as the keys to
the values, this is not documented or officially supported.
Even if it
were, you _cannot_ have a key with returns in it, and I have
no idea why
you'd want to!
Here are the steps you should be using:
1) Create your WinCtrl and store its ID in a regular numeric
value (I'll
call it wcID for convenience)
2) Set its Items property to listing.
3) Check for the existence (FileType) of your file with the
value of the
winCtrl in it. If it exists, set the value property of wcID
to the contents
of the file.
4) You're using wcS as your change event, so set up a
conditional on false
to true with wcS as the condition.
5) Inside that response, write the "value" property (without
the return) of
the wcID control to file.
HTH;
Amy -
How to display data in combo box from xml file.
Hi All,
I have the data in xml file.
<jukebox>
<song>
<title>When the Levee Breaks</title>
<artist>Kansas Joe and Memphis Minnie</artist>
<url>delhi601(www.songs.pk).mp3</url>
</song>
<song>
<title>Better Leave that Stuff Alone</title>
<artist>Will Shade</artist>
<url>delhi601(www.songs.pk).mp3</url>
</song>
<song>
<title>Walk Right In</title>
<artist>Cannon's Jug Stompers</artist>
<url>delhi601(www.songs.pk).mp3</url>
</song>
</jukebox>
and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
Can any one help me.
thanks
Raghu.Raghuvasa,
Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
combo.dataProvider = jukebox.song.url
or as a shortcut
combo.dataProvider = jukebox.descendants("url")
The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
Richard -
How to get values of combo box?
Hi All,
I had a problem that need to be solve asap. I would be very appreciated if anyone could help me.
I had a combo box that contain a string "Flower and Gifts" and when i passed the value to another jsp file it show only "Flower". I had been think for a long time about this problem. How can i pass the value to another jsp file with the whole value "Flower and Gifts".
Please reply asap. Thanks all.Hi,
Even i had the same problem earlier. Just try to print the string that you are passing to the next page, if it reads something like this "Flowers%20and%20Gifts" then you have to replace the special characters (i.e.,'%,2,0')with the blank spaces so that you have the complete string.
Example:
String str = "Flowers%20and%Gifts";
if(str.indexOf('%')!=-1)
str = str.replace('%','');
Thanks,
Rkanth -
How to get Subvalues using Combo box ?
Hi , friends,
I have one Combo box :
Having list of all Districts
When i select one of District it will give all related villages
regarding District that i selected in another combo box.
How to achieve this ? in one page itself
I have another idea but its not good..
where
1) first select District from Combo
2) Press submit
3) second page displays another combo and fetch perticular villages
and display in another combo.
but this technique requires more page navigation.
I want it should be on one page itself
PLEASE HELP ME ....
Ghanshyam
Message was edited by:
Ghanshyamthe brand old dependent combo issue..
as far as i know i could tell you for every two days a similar post is being posted here on the same thread..
you could have taken a look of them....
Anyways there are many ways of doing it....
In the days when XmlHttpRequest Object was not invented ppl used to achieve this using Hidden iframe and then updating parent frame dropdown by calling a javascript function onload of the page. or by auto refershing the page after saving the form state inside the scope of session.
However,using XmlHttpRequest Object (AJAX) nowdays is one of the smater ways of acheving tasks as these.
checkout one such examples where i've posted a similar example in the last reply
http://forum.java.sun.com/thread.jspa?threadID=5170019
hope this might help :)
REGARDS,
RaHuL -
How do i create a combo-box?
Dear guys..how do i create a simple combo-box that get populated with data fron the database at run-time? I can create pop-lists , but that is hardcoded and no good to me.
Kind Regardscheers folks..most helpful :)
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
Hi, Satnam Bihal
I think this code will solve your problem.
DECLARE
rgid RECORDGROUP ;
err NUMBER ;
BEGIN
:main.dynamic_list := '' ;
:main.list_value := '' ;
IF :main.sql_text IS NOT NULL THEN
CLEAR_LIST('main.dynamic_list') ;
rgid := CREATE_GROUP_FROM_QUERY('rg', :main.sql_text) ;
err := POPULATE_GROUP(rgid) ;
POPULATE_LIST('dynamic_list', rgid) ;
DELETE_GROUP(rgid) ;
END IF ;
END ;<HR></BLOCKQUOTE>
null -
How to Use a single combo box to generate two graphs
Hi All,
I have my data as below
Company Group Week Qty
CP01 16 40/2010 200
CP01 16 41/2010 210
CP01 16 42/2010 220
CP01 16 43/2010 230
CP01 16 44/2010 240
CP01 16 45/2010 250
CP01 16 46/2010 140
CP01 8 40/2010 300
CP01 8 41/2010 310
CP01 8 42/2010 320
CP01 8 43/2010 330
CP01 8 44/2010 340
CP01 8 45/2010 350
CP01 8 46/2010 140
CH13 16 40/2010 100
CH13 16 41/2010 210
CH13 16 42/2010 220
CH13 16 43/2010 230
CH13 16 44/2010 240
CH13 16 45/2010 250
CH13 16 46/2010 260
CH13 8 40/2010 100
CH13 8 41/2010 310
CH13 8 42/2010 320
CH13 8 43/2010 330
CH13 8 44/2010 340
CH13 8 45/2010 350
CH13 8 46/2010 360
I have to display the company level qty for each week against the Group data. I have a combo box for the company and on selection my destination will have all rows with that company, and on the destination rows as a source for the second combo box to choose a smaller set of data for the group and I draw a line graph.
But the user wants a baseline Graph, for example If they choose CP01, all the groups 16 & 8 qty will be summed up by the company. So I will have CP01 for 40/2010 I will have 500 Qty (300+200) so the base column graph will be 500 and depending on the Group selection it will be either 300 or 200.
I am able to the Group within the Company, but unable to do the company baseline. I think it should be done within excel using it's functions, any idea would help.
Thanks,
Arthur.Hi Alex,
I have some work around for your issue with excel fucntion please go through the folowing logic and let me know if u hv any issues.
(ComGrpWeek)
Concatenate Company Group Week Qty
=G8&H8&I8 CP01 16 40/2010 200
=G9&H9&I9 CP01 16 41/2010 210
=G10&H10&I10 CP01 16 42/2010 220
=G11&H11&I11 CP01 16 43/2010 230
=G12&H12&I12 CP01 16 44/2010 240
=G13&H13&I13 CP01 16 45/2010 250
=G14&H14&I14 CP01 16 46/2010 140
=G15&H15&I15 CP01 8 40/2010 300
=G16&H16&I16 CP01 8 41/2010 310
=G17&H17&I17 CP01 8 42/2010 320
=G18&H18&I18 CP01 8 43/2010 330
=G19&H19&I19 CP01 8 44/2010 340
=G20&H20&I20 CP01 8 45/2010 350
=G21&H21&I21 CP01 8 46/2010 140
=G22&H22&I22 CH13 16 40/2010 100
=G23&H23&I23 CH13 16 41/2010 210
=G24&H24&I24 CH13 16 42/2010 220
=G25&H25&I25 CH13 16 43/2010 230
=G26&H26&I26 CH13 16 44/2010 240
=G27&H27&I27 CH13 16 45/2010 250
=G28&H28&I28 CH13 16 46/2010 260
=G29&H29&I29 CH13 8 40/2010 100
=G30&H30&I30 CH13 8 41/2010 310
=G31&H31&I31 CH13 8 42/2010 320
=G32&H32&I32 CH13 8 43/2010 330
=G33&H33&I33 CH13 8 44/2010 340
=G34&H34&I34 CH13 8 45/2010 350
=G35&H35&I35 CH13 8 46/2010 360
Solution:
Company Group Week Qty (Formaule) Actual values
CP01 16 40/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O9,$J$8:$J$35) 200
41/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O10,$J$8:$J$35) 210
42/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O11,$J$8:$J$35) 220
43/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O12,$J$8:$J$35) 230
44/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O13,$J$8:$J$35) 240
45/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O14,$J$8:$J$35) 250
46/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O15,$J$8:$J$35) 140
40/2010 =SUMIF($F$8:$F$35,$M$9&$N$9&O16,$J$8:$J$35) 200
8 40/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O17,$J$8:$J$35) 300
41/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O18,$J$8:$J$35) 310
42/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O19,$J$8:$J$35) 320
43/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O20,$J$8:$J$35) 330
44/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O21,$J$8:$J$35) 340
45/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O22,$J$8:$J$35) 350
46/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O23,$J$8:$J$35) 140
40/2010 =SUMIF($F$8:$F$35,$M$9&$N$17&O24,$J$8:$J$35) 300
Simple funda here is jst concatenate the Company code + group + Week
Now at solution write a sumif function the range will be the concatenated values and sum range will be the Qty.
Let me know if you have any issues in implementing thsi logic.
Regards,
Anjanikumar C.A.
Maybe you are looking for
-
Ipad and iphone not syncing with icloud
My ipad AND iphone 4S have stopped syncing with icloud - for calendar and reminders at least - suspect for all apps - any suggestions anyone? Have tried ensuring default calender is the same across all, but thus is also impacting other apps.. Help ap
-
How do I fix this? I have this message that keeps popping up that says, "Start up disk almost full." I have reset my cache in safari, deleted as many photos as I could, but it still says the same thing. What should I do? Thanks so much! Also, I looke
-
Retained Earnings Statement Format(Financial Statement Version)
Dear Friends, Since 2 days i am requesting you regarding Retained Earnings Statement Format(Financial Statement Version) Please send me the fromat for Retained Earnings Statement Format(Financial Statement Version) It would be a great help for me and
-
Attaching an attachment to Work item
Hi all, I have req where I need to attach an attachment to the work item , I need to develop an FM which will do this .So could you please help me out ? This is on very high priority so Correct ans would be definately rewarded. Thanks .
-
The printer has the wrong icon
The printer has the wrong icon on one computer, the right on on the other. ===== I have a LaserJet 1320 at home, and a LaserJet 1200 in my pastor's study. My MacBookPro connects to the LaserJet 1320 as a network printer and to the LaserJet 1200 direc