Posting Cell Value Into URL Macro
Apr 17, 2014
Is there a way to post a specific cell value into a url with macro. here is the macro. I want to Paste the cell value of A1 into the end of the URL. I have also tried to put the desired url in A1 and just reference that.
Range("A2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://finance.yahoo.com/q/ks?s=(A1.value)", Destination:=Range("$A$2"))
.Name = "q?s=Activesheet.name"
.FieldNames = True
.RowNumbers = False
[Code] .......
View 1 Replies
ADVERTISEMENT
Mar 9, 2009
I have written basic macros (probably not the most efficient solution, but its what I know how to do). Up to the present point things are going well. (I tried to attach file, but without success - So I will email the file directly it is pretty easy to figure out) I have option buttons tied to macros that populate a data sheet based upon the input.
This works out quite well and I am able to generate the statistics I desire quite easily. Now comes the second phase, (this is where I am stuck) - when I click the option button "no", I would like this to generate a line item in a separate existing worksheet which lists the item number, tells the discrepancy (as written in the column on the inspection criteria sheet), has a text field for the inspector to briefly explain the exact nature of the discrepancy, and also keeps discrepancies in proper order. Conversly, if "yes" is selected, I would like to be able to check the associated comment page, search the page for that discrepancy number, and if found, delete the line item, then re-oder the page.
View 8 Replies
View Related
Apr 28, 2014
Problem-1) i want to round off the digit in the same cell i,e. Formula in F12 should be included in D12.
Problem-2) i have entered a sample account.in this i want to post the data entered in day book into their respective sheets of jaya and supervision automatically.
View 1 Replies
View Related
Apr 19, 2013
If I post a logo into a cell of a table, and then later move the table, the cell won't move with it. How do I set it so that the image is locked into the cell of the table? I've tried googling it but all I get are results to set the background of the cell to be the image, which isn't what I want.
View 7 Replies
View Related
Sep 19, 2012
So I'm recording some data to my access database and am wondering why my data will randomly find a place (row to be exact) between existing records in the table. It doesn't always behave this way, but does periodically. I would like my newly added records to be added new, from the bottom of the table every time. What am I missing from my code?
Code:
Sub RecordOrders()
Set iNv = Sheets("vnbinv")
Ir1 = iNv.Cells(Rows.Count, "B").End(xlUp).Row
Set wS = Sheets("1vnb")
Call OpenSessame
With rs
[Code]....
View 1 Replies
View Related
Nov 9, 2009
Adjust this code to output the differences in WS3 instead of WS2. I'm having trouble changing the worksheet in the code.
Ta in advance. Chuf
Sub CompBelowCol()
Dim ListA As Range
Dim ListB As Range
Dim c As Range
WB1 = ActiveWorkbook.Name
WS1 = "EE"
WS2 = "13"
WS3 = "New Order"
Set ListA = Workbooks(WB1).Sheets(WS1).Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
Set ListB = Workbooks(WB1).Sheets(WS2).Range("M1:M" & Cells(Rows.Count, "M").End(xlUp).Row)
For Each c In ListB
If c.Value "" Then
If Application.CountIf(ListA, c) = 0 Then
With Cells(Cells(Rows.Count, "T").End(xlUp).Row + 1, "T")
.Value = c
End With
End If
End If
Next c
End Sub
View 9 Replies
View Related
Oct 22, 2012
I have the attached worksheet which only changes the image on the last two items.
I can make a selection on the first four and none change, but when I make a selection on 5 or 6 they all work correctly.
Also, how could post the image on sheet1 at A1..A6 instead of Picture database column C?
ozgrid post image or photo.xlsm
View 1 Replies
View Related
Dec 28, 2008
I'm trying to set up automated posting from journal entries to ledger accounts.
What it boils down to is having XL match account numbers, from a 'Post Reference' column in a journal, with the corresponding ledger accounts (carrying the same respective account numbers) on another worksheet.
Then the transaction from the journal needs to be added to the identified ledger accounts in a sort of 'below-the-last-entry' manner.
View 5 Replies
View Related
Nov 22, 2010
I am trying to automatically insert a time into B and a date into A every time something is entered into C. I want the time and date to not change from the time it was posted. What formula will accomplish this?
I tried using if(C"",now(),"") while having Workbook Calculation set to automatic, but it would update every cell in column B every time I entered data into a new cell in column C.
View 8 Replies
View Related
Feb 22, 2013
I am trying to print a number of forms with a reference number however when i print i want the number to increase to the next one.
I have used
Sub PrintCopies_ActiveSheet()
Dim CopiesCount As Long
Dim copynumber As Long
CopiesCount = Application.InputBox("How many copies do you want?", Type:=1)
'Now the program wants you to input how many pages you like to print.
[Code] .......
However once i have ran it, save it, and then come back to it later to print again the numbers go back to 1 to 'X',
how do I get it to start from the last number printed?
View 3 Replies
View Related
Jan 8, 2014
I'm trying to create a sheet in Excel 2007 that organises shipments, the file is normally pretty large so I want to create a macro which does a few things, so when printed it's easier to work with. First one is to make a gap when items change in Column B and Column F, I can use the below code to make the gaps for one column but not both without making a separate macro. Is there a way to make the gaps on changes in columns B & F on one macro? (I have an example nearer the end)
Dim Rng As Range
Dim x As Long
Set Rng = Range("F12:F" & Range("F65536").End(xlUp).Row)
For x = Rng.Rows.Count To 2 Step -1
If Rng.Cells(x, 1).Offset(-1, 0).Value Rng.Cells(x, 1).Value Then
Rng.Cells(x, 1).EntireRow.Insert Shift:=x1Down
Rng.Cells(x, 1).EntireRow.Insert Shift:=x1Down
End If
Next x
After the data is separated I wanted to insert totals of the weights when there is a spacing, and a counter which stops after each spacing and restarts when the next items start.
Here is an example of the data I have before the Macro with Columns.
Column B
Column C
Column F
Column I
Destination of order
booking ref
Size
weight of orders
[Code] ........
This is how I would like the date to look like after the macro.
Column B
Column C
Column F
Column I
Count
Destination of order
booking ref
Size
weight of orders
[Code] ..........
View 4 Replies
View Related
Mar 1, 2014
trying to get a specific value to appear if the value falls within two dates in which it was posted.
I have the following data
1/1/2014 in Cell AB2
$1000 in cell M3
1/1/2014 in cell P3
12/1/2014 in cell Q3.
What I'm trying to do, if Value 1/1/2014 AB2 falls between 1/1/2014(P3) and 12/1/2014 (q3), then I want it to return $1000 (M3), if it does not, then to post 0 or blank.
View 1 Replies
View Related
Feb 24, 2014
creating a distributable add in which will post either one or many URL's (predefined by me) to outlooks favorites section. I.e. when I distribute this add in to the user and the user runs it, the url's should be posted to the favorites i.e. the user should be able to click on the links and access the URL's.
View 4 Replies
View Related
Jan 2, 2014
I am trying to build a workbook to track patient treatments. My overview sheet needs to list the last treatment received per patient which is listed in column a of each patient's individual sheet dynamically so I can review the history of treatments as well. I have tried to create a dynamic list, but it is not functioning correctly. I was using : =OFFSET(txdate,1,0,COUNTA('patient, name'!$A:$A),1) , where column A ( the named range "txdate") lists the treatment dates in succession and should be updated automatically when a new treatment is done.
View 10 Replies
View Related
Jan 9, 2014
Excel ( 2010 ). I am creating a Sales Leads spreadsheet. Within the spreadsheet I have a the following relevant fields.
proposed sales value field ( F2 ), Estimated Close - which will be Q1,Q2,Q3 or Q4 ( G2 ), % Probability ( H2 ) & Q1 ( I2 ), Q2 ( J2 ), Q3 ( K2 ) & Q4 ( L2 ).
F2 = 150
G2 = Q2
H2 = 10%
I want to calculate the actual value of sales based on %prob and put the total into the correct field ( I,J,K or L ) based on what field G2 says. So in this case 15 into field J2. I have attached an example.
View 4 Replies
View Related
Jul 23, 2012
I have a spreadsheet where I'm copying data from one tab to another and also copying values down in certain columns. I have a "chunk" of data already on the tab I'm working on and want to copy an additional "chunk" below it. I want to fill a whole column with the same data but only in my second "chunk". So in this instance...it's an account number and all of the rows in the first chunk have account number 42243 and in the second chunk, I want it to be 78300. The account numbers will always be the same but the number of rows will not be. So for the first chunk, I was able to use the following code...
Code:
'Copies account number 42243 into column C for all lines
MyCount = Application.CountA(Range("a:A"))
Range("C2", "C" & MyCount).Value = 42243
Range("C1").Select
And right now, I have the following in for the second chunk. But obviously what this is doing is putting 78300 in the account field for the entire column, not just the second part.
Code:
'Copies account number 78300 into column C for all lines
MyCount = Application.CountA(Range("A:A"))
Range("C2", "C" & MyCount).Value = 78300
Range("C1").Select
View 5 Replies
View Related
Jan 15, 2014
I have a macro where I manually select a cell then the macro kicks in to copy and paste the contents into the Find function. From there it goes to another work sheet, clicks on a cell in column one and searches for matching cell contents. Then If false it manually goes back to the original worksheet/cell and then I input a N in the left adjacent cell. If true I enter a Y. Right now I can only run this for the specific cell the macro was recorded for. I would like to expand this.
What I would like to do create a loop in the macro that waits for my cell choice input then continues with the with the Find function. If false the macro should just loop back to the original worksheet/cell and wait for input, ie the next cell selected. However, if true a worksheet/cell is selected, a Y is input and it loops back to the original cell and waits for input.
View 9 Replies
View Related
Aug 13, 2014
This is the code I use to call a macro when the macro Im calling is in the same workbook.
[Code].....
However, I would like to call this same macro when using another workbook. I copied the macro "Clearformating" and pasted into a personal macro workbook module. However when I add this code to the sheet tab it will not run the macro.
I also tried this code.
[Code] .....
View 2 Replies
View Related
Mar 16, 2007
1st - Need a macro to change a range of cells colours based on a single cell having a value greater than 0.001. ie. cells A1 - G1 need to change to grey based on cell F1 having a value greater than 0.001 entered in it?
2nd - Also a macro for deleting the text contents of cell C1 based on cell F1 having a value greater than 0.001. Therefor if cell F1 has a number greater than 0.001 it changes the colour of celss A1 - G1 and also deletes the text in cell C1?
View 2 Replies
View Related
Jan 7, 2009
I have a Sheet sheet1 and I want to run a macro when the cell D2 in Sheet1 is equal to 10,7,5,and 3. I only want this macro to run when those values are reached the macro then puts the data onto a sheet called wps. The macro is run as a module and is a sub macro.
View 9 Replies
View Related
May 14, 2014
Basically, what I'm dealing with is an inventory system. When a cell value reaches below a certain quantity, we have a cell light up with the word "YES" (under the "re-order" column). What I'd like to do is have a macro that checks to see if that cell is populated with "YES" and if it is, to run another macro (which I already have written) that sends out an email notifying us of the need to re-order.
How it would work: The person pulling out the inventory would fill out this form and click "Submit"
submitbutton.jpg
I would then have a "call" code tied to the "Submit" button that when clicked, would run the macro to check cell population and send out the email. The email code is already written and works flawlessly on it's own. I just cant seem to figure out how to write a macro that checks for cell value and then runs it (or not) based on that.
View 14 Replies
View Related
Mar 18, 2012
I would like to make a macro that loops another macro and changes a value in a cell, like such:
Run macro
if cell A1 = cell A2
Stop
Else set value in cell A1 -0.1
Loop
How exactly would i do that?
I have a little bit:
Sub Macro2()
Call wantedmacro
With Range("A1")
If .Cells(1, 1).Value = "A2" Then Exit Sub
Else Range("A11").Value = (A1-0.1)
Call Macro2
End Sub
View 4 Replies
View Related
May 17, 2013
I have a macro called "ResultCopyPaste". When it is run it copies and pastes some results. I have a cell C23 that counts how many more results need to be run, copied and pasted. As each result is copied and pasted the count changes. When the count gets to zero nothing else needs to be done.
I want to create a macro that will repeatedly run the "ResultCopyPaste" macro until C23 shows zero. What is the VBA code? Presumably something to do with repeating the macro if C23>0
In case it's relevant the code for the ResultCopyPaste macro is:
Sub ResultCopyPaste()
'
' ResultCopyPaste Macro
[Code].....
View 2 Replies
View Related
Feb 18, 2009
Been racking brain, searching through the forum here, and my Excel 2003 Bible all day trying to figure out this problem to no avail. I would like to clear the contents of any cell in a given range if the cell immediately to the right of is formatted as bold.
View 2 Replies
View Related
Mar 27, 2007
I have 2 columns and 10 rows (A1:B10). In column A are certain text values. How do I write a macro to go through the table and preform an operation in the corresponding cell in column B depending on the value in cell A? for example, if A3 = "Complete", overwrite the formula in B3 with the value (paste value)?
View 2 Replies
View Related
Feb 19, 2014
Basically I have three columns in a work Sheet F, G, & H. F is empty, G contains text and column H has both text and numbers.
I want to be able to automatically copy the value from Cell H to Cell F if cell G contains the word cost.
I would also like to delete all rows where Column G & H contain two dashes -
View 7 Replies
View Related
Jul 30, 2013
Is this possible using code: Copy Cell A1 and Paste in first empty Cell down Column D. This would be connected to a command button. Both Cell A1 and Column D are on the same spreadsheet.
View 3 Replies
View Related
Feb 6, 2008
I have a sheet where i have many differently named areas (like state1_1 and state1_2) When I doubleclick on a cell then a macro should run with following criteria: 1) Macro will run if the doubleclicked cell is part of any range in the list. Here I mean that names of ranges which belong to that list start with word state (like state1_1 and state1_2). No other ranges should not be in that list. If the cell is not in the range that is part of the list, then nothing should happen.
View 2 Replies
View Related
Sep 30, 2009
My question: Is it possible to write a code that calls the macro with the name specified in a particular cell? Right now I have some AutoFilter going on making a list that has numbers 1, 2, 3... I also have alot of macros named Search1, Search2, Search3... So I can make a cell, say A28, that combines "Search" with whatever number is in Column C, row 29:
View 2 Replies
View Related
Oct 23, 2013
I am attempting to create a ROI calculator for my place of work. I want a blank cell to fill in green or red based a cell below it being equal or greater than 5.0%. What is the Macro or equation to do that?
View 5 Replies
View Related