Assign Values From Multi Columns
Dec 28, 2007
I have a large excel sheet with the following format:
ColA ColB ColC...
55430 4 45
55431 5
55432 4 7 25 36
...
and i need to convert it as...
ColA ColB
55430 4
55430 45
55431 5
55432 4
55432 7
55432 25
55432 36
View 9 Replies
ADVERTISEMENT
Feb 20, 2013
I wan to extract Unique values, here is the data for reference, I have made to tables the second table is desire result I wanted.
Sheet30 Â ABCDEFG1JOB #WASHQTYÂ JOB
#WASHQTY27800A1000Â 7800A100037801B1000Â 7801B100047802A1000Â 7802A100057800
A1000Â 7802C100067802C1000Â 7805B100077805B1000Â 7807D100087800A1000Â 7809D
100097807D1000Â Â Â Â 107802C1000Â Â Â Â 117809D1000
View 9 Replies
View Related
Mar 20, 2014
vba code to find multi values in a Sheet With 6 columns values like :1,3, 12,16, 20 ,31, 36, 44, 46,
View 2 Replies
View Related
Feb 28, 2010
I have a list of grades they are 3a, 3b, 3c, 4a, 4b, 4c, etc up to 7a. An a is one grade than a b, and a b is one grade higher than a c. In one test a student may score a 4b and in another a 4a. I need a way to calculate the difference in "grades" e.g if a student scores a 4a in test 1 and a 5c in test 2 the difference is 1.
Is there a way I can do this using custom formatting or will I have to assign values to the grades and insert extra columns to do the calculations. I need the simpliest way as I have to disseminate to my staff in my department.
View 9 Replies
View Related
Jul 16, 2013
Let's say I have one column of;
1
2
3
4
5
6
7
8
9
What is the most efficient way to change this into '3-columns & multi-rows' like this?:
1 2 3
4 5 6
7 8 9
The actual list is a lot longer and numbers are not in order.
View 7 Replies
View Related
Jul 7, 2013
I'm attempting to assign 1 of 4 predetermined values to a cell based on the values of entries in another cell.
View the example attached : Value assignmts.xls
Assign the Value of 1, to (D8) when any value entered in (C9) is equal to or over 380, but less than 410.
Assign the Value of 2, to (D8) when any value entered in (C9) is equal to or over 410, but less than 440.
Assign the Value of 3, to (D8) when any value entered in (C9) is equal to or over 440, but less than 470.
Assign the Value of 0, to (D8) when any value entered in (C9) less than 380.
View 9 Replies
View Related
May 30, 2012
I have a bunch of worksheets with various data that is in columns ranging from 1 upto 20 (this is different with each sheet) across and each column has data rows that has various numbers.
What I want to do is create a sheet when I need to organize some data and control A all the data and paste on to this sheet hit a macro and have it take all columns and stack them in to column A.
Each row will have a different number of populated cells and there are sometimes 5 columns up to 20 columns
Example
Column A - 100 data pieces
Column B - 325
Column C - 100
and so on...
The macro should leave all items in column A but then cut all 325 records (row 1-325) and then paste them starting in cell "A101" then move to Column C and stack those below what was moved form column B and so on.
The code will stop at the first blank space in each row and will go from right to left until it hits the first blank cell in the columns.
View 3 Replies
View Related
Apr 28, 2009
I have attached a sample spreadsheet where I now want to move date from multiple rows to one row and multiple columns where data in A is common, hopefully spreadsheet shows this more clearly. I have shown sample on two sheets, before and after. I want to have all data in a single row for instances where A the same.
View 2 Replies
View Related
Feb 11, 2014
I am currently setting up a userform where one of the options is for an error code (chosen from a listbox) but the user has to be able to select multiple codes. I have the below working if it is NOT multi select, works a dream and goes in the right column.
VB:
If ListBox2.Text = "A1" Then
LastRow.Offset(1, 20).Value = "x"
ElseIf ListBox2.Text = "A2" Then
LastRow.Offset(1, 21).Value = "x"
But as soon as I set it to mutliselect and choose say A1 and A2 neither one writes, I imagine because Listbox2.text is now A1,A2 and not just one or the other.
View 9 Replies
View Related
Dec 5, 2007
So I have a worksheet filled with a lot of text in individual cells in one column. What I would like to do is split up the text into different columns in one row so that I can use it easier. The data would be seperated by blank lines within the cell (basically when you hit alt+Enter in the cell). Sample data of a cell is below...
Cell A1:
_____________________________
Directions: Baking an Apple Pie
First you must .... etc
Total time required: 30 minutes
_____________________________
What I would love to be able to do is split up the above sample cell into three different columns, in the same row. So the above cell would become...
Cell: A1 Cell: B1 Cell: C1
____________________________________________________________________________
Directions: Baking an Apple Pie | First you must .... etc | Total time required: 30 minutes
____________________________________________________________________________
And then so on and so forth for the rest of the data in that column. I realize that VBA code will be needed for the above... I searched the forum for something that would address this particular issue but have had no luck.
View 2 Replies
View Related
Mar 30, 2007
I realize that the easier resolve to this request is to use Access & we are moving to that application.
I have included a worksheet as an example.
We have a 'work in progress' (WIP) worksheet that contains 12 rows of data per job. Need to know how (or if) you can sort by the "Job #:" value while maintaining the group of information necessary for each individual job.
Not a normal sort because the values aren't entered in typical side-by-side row & column format.
View 10 Replies
View Related
Jul 21, 2014
I am using a ComboBox on a worksheet where the items in that box are pulled from Sheet1A:A. When the selection of the item in the comboBox is made, I would like several textboxes on that same page to be auto-populated based upon info derived from cells adjoining whatever row in Column A was chosen on Sheet 1.
For simplicity sake, let's say the range on Sheet 1 is A:H, and TextBox1 = "B", TextBox2= "C", etc.
so if,
A B C D
JOHN 15 DOGS BLUE
SUE 18 CATS RED
BOB 20 TURTLES YELLOW
When Combobox selection is JOHN, I want TextBox1= "15" TextBox2= "DOGS" TextBox3= "BLUE"
View 2 Replies
View Related
Sep 28, 2011
I would like to know how can I plot my x axis of a chart with the maximum and minimum value that I have in this variable. Note that my variable is no going from the lower value to the highes one, it is random. So what I did is to use the autoscale of the chart, but it is not working as I would like. Any solution?
The code that I use is:
Code:
' TO GET THE INITIAL and FINAL VALUE and the STEP
Worksheets(wsheet(27)).Activate
ActiveSheet.ChartObjects(chartName(11)).Activate
ActiveChart.Axes(xlCategory).MinimumScaleIsAuto = True
ActiveChart.Axes(xlCategory).MaximumScaleIsAuto = True
ActiveChart.Axes(xlCategory).MajorUnitIsAuto = True
xScaleMin = ActiveChart.Axes(xlCategory).MinimumScale
xScaleMax = ActiveChart.Axes(xlCategory).MaximumScale
xScaleStep = ActiveChart.Axes(xlCategory).MajorUnit
'After I use them (xScaleMin,xScaleMax,xScaleStep) for several charts, in this way:
ActiveSheet.ChartObjects(chartName(11)).Activate
ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Text =VarName
ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Select
ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Font.Size = 11
ActiveChart.Axes(xlCategory).MinimumScale = xScaleMin
ActiveChart.Axes(xlCategory).MaximumScale = xScaleMax
ActiveChart.Axes(xlCategory).MajorUnit =xScaleStep
' but if my data was between 50 and 250 it is plotting between 0 and 300
View 2 Replies
View Related
Jun 29, 2014
I am trying to make a macro that when clicked, will randomly choose one of 7 values and type that into cell C4. Values can be Dodgeball, Football, Soccer, Tetherball, Soccer, Baseball, Basketball. Is this doable?
View 9 Replies
View Related
Feb 18, 2008
Assign values to ratio buttons
I have created a UserForm in Excel, to gather data for a questionnaire.
For each question, the user must select an answer from a radio button (Yes, No and N/A)
When I add the record (answers) to the sheet1, the results are shown as all being false.
I want to show either ‘Yes’ or ‘No’ or ‘N/A’
Private Sub CommandButton2_Click():
Dim LastRow As Object
Set LastRow = Sheet1.Range("a65536").End(xlUp)
LastRow.Offset(1, 1).Value = UserForm1.OptionButton1.Value
LastRow.Offset(1, 1).Value = UserForm1.OptionButton2.Value
LastRow.Offset(1, 1).Value = UserForm1.OptionButton3.Value
End Sub
View 9 Replies
View Related
Sep 15, 2008
I have an issue with some excel spread sheet I am working on.
I am using Macros, Buttons to assign values to a text box.
When I do not protect the worksheet no problems.
When I include my calculation sub into my Worksheet Change module.
It sort of works but flashes a lot, and takes about 6 or more seconds.
When I dont include it in the Worksheet change module it doesn't flash and seems to work fine.
When I protect the work sheet, in my code I unprotect it and try to run my code, but it wont go through. I get an error.
Run-Time error '1004': Application-defined or object-defined error
Worksheet Module
Option Explicit ' Force the declarations of all variables in this module
Private Sub Worksheet_Change(ByVal Target As Range)
'Unprotect
'Call Calculate_Decision
If Range("MoreBorrowers") = "Yes" Then
Rows("21:27").Hidden = False
Else
Rows("21:27").Hidden = True
End If
If Range("GuaranteeYN") = "Yes" Then
Rows("159:167").Hidden = False
Else
Rows("159:167").Hidden = True
End If
I have tried adding in the Me. before my Range but nothing seems to work.
View 9 Replies
View Related
Jan 15, 2009
I want to assign a cell a formula that changes base on variable, example
myVar=3
Cell(1,1).value = "=average(1:{myVar})"
what do i do to make this work instead of {myVar}?
View 9 Replies
View Related
Aug 30, 2007
The data is has the following structure:
ID no | Name | Group | Organisation | ...A load of data metrics...
Currently I'm using a standard combobox to select which row of data to analyse - this is based on the concatenation of the persons name, their group and their organisation. What I would like to do is to:
1. Be able to select more than one person
2. Be able to select all/some people from the same Group and Organisation and get their data - e.g. filter the data so that only data for one group is shown and then be able to select one or more names from that group to analyse the data for
View 3 Replies
View Related
Mar 8, 2005
Is it possible to assign values to names in a list, so that when you validate it as a drop-down list, you can select a name from the drop-down and it's corresponding value will be added to separate cell? Basically, I have survey questions which have five possible responses: Excellent - Very Good - Good - Fair - Poor. We want to assign a value to each, 5 for Excellent, 4 for Very Good and so on, so that when a response is selected from a drop-down, it's value appears in a separate cell (so that we can calculate a total and average score from the selections).
View 5 Replies
View Related
Jan 24, 2009
In my workbook sheet 11 has some ranges that need to have names based on cell values in sheet2 (for purposes of data validation lists).
Range S28:S46 will assume the name of sheet2A11 & sheet2A3.
(example name period_1unit_1)
Range U28:U46 will assume the name of sheet2A11 & sheet2A4.
Range W28:W46 will assume the name of sheet2A11 & sheet2A5
Right now I am calling the code when something is entered into A11.
I have tried if statement and select case, but I ran into complications with both.
I have posted both codes with the questions I have concerning those codes.
View 6 Replies
View Related
May 23, 2009
For example, I have the numerical value "400" in R1C2 and that value would be used in the name "D400" which is to be assigned to R1C1:R5C2.
The code I have is:
Range("R" & DRow & "C1:R" & DRow + 4 & "C2") = "D" & Cells(DRow, 2).Value
but is throwing up the error:
"Run-time error '1004':
Method 'Range' of object '_Global' failed
DRow increases dependant on other variable data.
Also, am I right to be using R1C1 instead of A1, or can the same be achieved using A1 references? If so, I think I may not be able to see the wood for the trees.
View 9 Replies
View Related
Jan 31, 2010
I am working up a workbook template that will be used to process survey results. The way I ultimatley want it to work is that the user can paste data from another application into a worksheet in Excel, and then view analysed results on a second sheet (which are processed via formulae on a third, hidden sheet).
The problem I have is this: the data from the program that's capturing them are text values. For example, column B contains answers to a question where participants rate an experience, and the values are either "Excellent", "Good", "Fair", "Poor", "Awful". I want these to be converted to numerical values, on a scale where "Excellent" = 5 and "Awful" = 1, so that I can then average these.
So, the question is: Can I somehow tell Excel that "Excellent" = 5 and "Good" = 4 etc, and then use AVERAGE(B:B) on the text data and get a number back?
I did think of having an intermediate sheet that used VLOOKUP to create a copy of the first sheet (where the user pastes the text data) with the text replaced by numbers. But, because I don't know in advance how many rows will contain data (i.e. how many survey results there will be), I have to assume on the high side and copy down 50,000 rows. But, this takes ages to calculate.
View 9 Replies
View Related
Jul 23, 2006
Need exact VBA code syntax to assign a workbook (to be closed) sheet's cells J4 to J72 values to a variable called "ColJValues" to be assigned to another sheet (to be opened later in the macro). The values are all dates. Once the other workbook is opened later in the macro, need the exact syntax to assign the value in the above variable, "ColJValues", to it's cells J4 to J72.
View 8 Replies
View Related
Feb 11, 2007
How can I assign values from a listbox to a twodimensional array?
and next
do something like search and remove a row and assign the array back to the listbox
I know I can do it directly, but I need the array for something else too
View 5 Replies
View Related
Jun 6, 2007
I have three variables; Independent variables x & y, and dependent variable z. x & y can take the values 1,2,3 and can equal each other z can also take on values 1,2,3 but can never equal x or y. I tried using if/and statements to solve this (see below), but I would have to do it for each case and it exceeds Excels embedded function limit.
=If(and(B7=1,B10=1),riskduniform(E4:E5),if(and(B7=1,B10=2),3,if(and(B7=1,B10=3),2,if(and(B7=2,B10=2),riskduniform(1,3),if(and(B7=2,B10=1),3,if(and(B7=2,B10=1),3,if(and(B7=3,B10=3),riskduniform(1,2),if(and(B7=3,B10=1),2,if(and(B7=3,B10=2),1)))))))))
View 3 Replies
View Related
Dec 17, 2007
I have a formula that counts all instances of the letters a, b and c in a range and assigns them a value of 1 unless they are in the M column in which case a, b or c counts 4.
=SUM(COUNTIF(J2:AB2,{"a*","b","c"}),OR(LEFT(M2)={"a","b","c"})*4)
This worked well but now I need to modify the weightings across this range. My new goal is to count all instances of a,b and c in the range J2:AB2 but have M column a,b, c's = 2 and N:R column a,b,c's equalling 4. Letters other than a,b or c count as 0.
Example:
J2...K2...L2...M2...N2...O2...P2...Q2...R2...
A....B.....B.....C.....B.....D....B.....C.....E
the output of the above sequence should be
1+1+1+2+4+4+0+4+4+0 = 21
View 4 Replies
View Related
Feb 27, 2008
My company is soon to be rolling out a new payment system, and I'd like to be able to track commission for everything I sell. Briefly, we get paid via a percentage of the company's gross profit, and the way in which the company gets paid is tiered. (the cellphone business)
So, If a customer activates a plan thats below $39.99, we get paid X amount. If it's below $59.99 we get paid Y amount, and so on and so forth, there are multiple different tiers.
What I want to do is set up a list via data validation so that I can pick what plan they have (via the name of the plan) and have it return a numerical value (ie $39.99) and also have the ability to pick text messaging, etc as options so that the workbook will add the monthly rates (39.99 + 14.95) and then have it return value for the right priceplan tier.
If this is confusing, I apologize for not being more clear, but attached is an example. The top one is what I'm actually trying to code, but the bottom is completely filled in, so you can get a more clear sense of what I'm trying to do. Honestly I'm not even sure if it can be done.
View 2 Replies
View Related
Jun 17, 2008
What I need to is create a VBA function with several parameters that reads data from an M x N range of rows and columns (matrix). I cannot just pick and choose certain cells within this range as the function goes into a loop through at least 200 cells in the 35 x 200 range. Obviously, I am here posting as I cannot get this function to work. I believe my troubles lie with reading this range into the function...
Application.Goto Reference:="range"
rangearray = Selection.Value
values(I, J) = rangearray(I + 1, J)
Do I need to set a function variable equal to that range, or do I do this another way? Basically, I need to have the ability to pick a given cell(m, n) out of the range and have my way with it in the function.
View 3 Replies
View Related
Mar 1, 2013
I have a column with (potentially) multiple values in, heres an example:
Marketing Specialism
Commercial, Multi-channel, Loyalty/Retention
Analytics, Partner
Analytics
Commercial, Analytics, Segment
[code]....
What I need to be able to do is count (and then chart) the number of each value, irrelevant of whether it appears with another value in a cell. e.g.
Analytics, Parter - Would count 1 Analytics and 1 Partner
Analytics - Would count 1 Analytics
I know there is a formula where I can specify the value to count, but as the column has so many different values I would have to write a formula with each separate value, this would take a long time.
View 2 Replies
View Related
Jan 10, 2014
I need to combine around 20 columns into one single column, then I also need to insert open and close html tag for each column moved. See attachment example or information below
BULLET 1, BULLET 2, BULLET 3, BULLET 4, BULLET 5 ====> DESCRIPTION:
DESCRIPTION COLUMN
<ul>
<li>BULLET 1</li>
<li>BULLET 2</li>
<li>BULLET 3</li>
<li>BULLET 4</li>
<li>BULLET 5</li>
</ul>
View 7 Replies
View Related