I need help with the following setup:
HubSpot (HS) form is filled out: name, email. zip code.
Zapier adds row to an existing Google Sheet 1 (GS1) with 4 columns: name, email, zip, department
Google Sheet 2 (GS2) has two columns : zip, department
Zapier needs to look up zip code in GS1. match zipcode in GS2, lookup department in GS2 and insert it into GS1 department
I need help with Number 4. As soon as I have that I can send info back to HubSpot and carry on with the flow I am making.
Can anyone help ?
Thanks in advance.
I think we may have a quicker solution at-hand, assuming you prefer one less Zap for the final step.
If you create a second Worksheet in GS1 to house your Zip+Department data, you can use a VLOOKUP to solve your data reconciliation challenge.
Set up your first Zap to copy only Name (Column A), Email(Column B), and ZIP (Column C).
Add your ZIP+Department data to a second sheet.
In column D, use this formula :
=VLOOKUP( C2, $RANGE_OF_ZIPCODES, 2, FALSE )
What this does...
C2 < This is the ZIP you want to look up for the current row.
[$RANGE_OF_ZIPCODES] < Replace this with either a Named Range of Cells
2 < If the ZIP from C2 is found, select the value from the SECOND column in the range
FALSE < Require an exact match of the ZIP value provided in C2
If the ZIP code is found, the matching department will be returned! If it's not found, you will see an error value in Column D.
Think this approach will work for you?
Assuming there are not too many zip code & department relationships, you could avoid steps 3 and 4 altogether and use Code by Zapier to look up the department in between steps 1 and 2. Then when you add the Google Sheets row in step 2 you will already know the department to insert.
Your "data out" for the Google Sheet in Zapier will then have access to department which will be a valid department string, or 'No Match!'
Example:
var hubspotZip = inputData.zip;
output = [];
var departments = {
"00001": "Department A",
"00002": "Department B",
"00003": "Department B",
"00004": "Department C"
};
if (departments.hasOwnProperty(hubspotZip)) {
var zipDepartment = departments[hubspotZip];
output.push({department: zipDepartment});
} else {
output.push({department: 'No Match!'});
}
Related
I understand this is a tough way of wording the problem I have. Please try and help me.
I want to create a Column called Orders which contains cells based on corresponding item values.
So if I have columns: FlatNo, Truffle, Pineapple, Mango, Chocochips; I want to create a column called Orders which has value:
FlatNo - A51
Mango - 1
Chocochips - 1
(if no values in the Pineapple & Truffle Columns, none show up in Orders columns)
See image
How do I do that ? Thank you in advance
You can use IF and &. & simply puts the different desired things altogether.
Hope the following formula will get you the result for column orders. I have put the number of each item ordered inside parentheses before the item.
="Flat No. "&A2&IF(ISBLANK(B2),"","-("&B2&")"&$B$1)&IF(ISBLANK(C2),"","-("&C2&")"&$C$1)&IF(ISBLANK(D2),"","-("&D2&")"&$D$1)&IF(ISBLANK(E2),"","-("&E2&")"&$E$1)
For instance the third order is shown like this: Flat No. E-23-(1)Truffle -1 Pc Rs 60-(3)Mango -1 Pc Rs 60
I apologise if this comes across as a newbie query, but I have been stumped by this for some time.
I am building an excel spreadsheet for my staff to be able to compare stock listings easily and automatically based on reference data held in a different sheet within the same workbook.
The difficulty is that I want to pull this reference data based on the values chosen from a total of 6 conditional drop down lists I have created.
Based on what is selected, the values on say Sheet 1 will display the relevant values from Sheet 2 automatically (i.e. if one of the list options is changed, the "results" will update with the associated data automatically).
I have tried using lookup functions, arrays and nested if functions, but I have been unable to get it to work properly - probably due to my own lack of depth of knowledge for this type of coding. As such I am looking for advice about the best way to code this function requirement.
The format of what I am trying to do is this:
Sheet 1 - The 'GUI'
This sheet has the dropdown lists and the "displayed results" section
dd1 - State (6 options)
dd2 - Product Type (4 options)
dd3 - Product Brand (3 options)
dd4 - Product variation 1 (eg model) (say, 2 options)
dd5 - Product variation 2 (eg colour) (5 options)
dd6 - Product variation 3 (eg size) (3 options)
Sheet 2 - Reference data
Table 1 - ACT products and variations
Table 2 - VIC products and variations
Table 3 - NSW products and variations etc and so on...
Based on choices above in Sheet1, I want the product & price to be listed in cells below. Currently I have conditional functions listing the avail options based on the choice made for the prev list working fine.
I need it so that:
IF dd1 = "ACT" AND dd2 = "Mobile" AND dd3 = "Apple" AND dd4 = "iPhone" AND dd5 = "white" AND dd6 = "128Gb"
Then
The results cell, say Sheet1!C10, will reflect the price of the item based on a table of data lists in Sheet2 (say for eg the listed value is in Sheet 2, Cell A5)
But if say the list choices change, eg dd3 was changed to "Samsung", then the lists will auto update because of the conditional formatting already; but I then want the results to be updated accordingly (eg the price listed based on the new choices will then reflect Sheet2!B3).
Because of the many options and variations, there are many tables in Sheet 2 for reference, so the 'IF' statement to cover all these options would be massive and convoluted.
Is there a relatively concise way of writing vb code for this function to suit?
My current code under the worksheet_change sub
If Range("D10").Value = "ACT" And (Range("D11").Value = "Mobile" And (Range("D13").Value = "Samsung" And (Range("D14").Value = "S7") And (Range("D15").Value = "Black") And (Range("D16").Value = "128"))))) Then
Sheets("Sheet2").Range("F20").Value = Sheets("Sheet4").Range("C5").Value2
Sheets("Sheet2").Range("F29").Value = Sheets("Sheet4").Range("C6").Value2
ElseIf Range("D10").Value = "ACT" And (Range("D11").Value = "Mobile" And (Range("D13").Value = "Samsung" And (Range("D14").Value = "S7") And (Range("D15").Value = "Black") And (Range("D16").Value = "256"))))) Then
Sheets("Sheet2").Range("F21").Value = Sheets("Sheet4").Range("C8").Value2
Sheets("Sheet2").Range("F22").Value = Sheets("Sheet4").Range("C9").Value2
Sheets("Sheet2").Range("F29").Value = Sheets("Sheet4").Range("C10").Value2
'and so on. With all the variations, there's prob going to be approx 20+ elseif statements.
End If
Ive only pasted 2x sections for the purpose of this request. I can copy it down or adjust the code accordingly for each option.
Ive not used nor written arrays before (successfully i.e.) so I have no clue/understanding if that is a better way, but i have written vba for basic functions and macros before; but im open to learn.
I am trying to work in excel using IFAND rule to try and build the following logic however I am unsuccessful until now.
Department Date Customer
Digital 11/02/19 Customer A
Voice 14/02/19 Customer A
What I am trying to achieve is that, if customer A contacted us through a dept = digital and after voice it will return 1.
Can someone help please?
=if(and(A:A="Digital",B:B>b2,C:C=C2,A:A="Voice"),true,false)
This is the logic we have used so far.
Thanks!
Assuming data is sorted on Customer and Date, then try:
=AND(C2=C3,A2="Digital",A3="Voice")
Try Sumproduct,
=IF(A4="Voice",SUMPRODUCT(($B$3:$B$4>B4)*1,($C$3:$C$4=C4)*1,($A$3:$A$4="Digital")*1),0)
it allows you to assign a 1 for each row that meets the various criteria and then times all 3 criteria's resulting integers together
Criteria 1: Is column B greater than Date?
Criteria 2: Is column C = Customer
Criteria 3: Is column A = Voice
If all criteria are met for the row then
1x1x1 = 1
If any criteria arent met then the result is 0
0x1x0 = 0,
1x0x0 = 0,
0x0x0 = 0,
0x0x1 = 0,
etc, etc
Trying to count Agents unique number of Callers but if caller exists on another table under another agent name - then dont count this as his caller:
Calls Sheet:
Agent Name / Dispatch is in range: (Calls!E:E)
Callers Number / Phone is in range: (Calls!H:H)
E (Agent Name) H (Callers Number)
John 1111111
Kelly 3333333
John 3333333
Kelly 2222222
John 4444444
John 1111111
Job Data Sheet:
Agent Name / Dispatch is in range: 'Job Data (Closed)'!D:D
Callers Number / Phone is in range: 'Job Data (Closed)'!M:M
D (dispatch) M (phone)
Kelly 2222222
John 3333333
Final Live Report Sheet:
A (Agent) D (Unique Calls)
John 3
Kelly 1
John won the caller 3333333 to be counted But not only because we removed duplicates from the calls sheet, but since he submitted this caller and existed in the Job data sheet with that caller. Kelly also spoke with caller 3333333 but she did not submit him to the job data sheet. both answered this caller.
We are trying to count how many incoming callers were answered by agents. ( from a Calls data Sheet with another confirmation check on another job data sheet).
Conditions:
UNIQUELY Count (Without Duplicated Caller Numbers range: Calls!H:H) by Agent Name 'Live Report'!B3 = (Calls!E:E)
AND
That those calls also belong to them - Condition:
That were not submitted by another agent: Two step check here at once like this:
Look for current customer number from current row (Calls!H:H) Look for it inside the new range in the new table of customer numbers 'Job Data (Closed)'!M:M sheet:
IF exists make sure not under a different agent(dispatch) name Like this:
See that the Dispatch name on the same row of that number on the job data sheet is the same as the original agent name on the calls sheet:
Check that 'Job Data (Closed)'!D:D (Dispatch name) on the same row of the 'Job Data (Closed)'!M:M (callers number) that was found existing in the jobs sheet equals to the original Agent Name from the calls sheet (Calls!E:E). If not, then do Not Count this callers number as a call for this agent.
We already have a CountIFS formula counting calls uniquely for each agent, but it counts from a Calls sheet that has been removed duplicates from using a different formula upfront on another sheet:
=COUNTIFS(RemovedDuplicatedCalls!E:E,'Live Report'!B3)
That is wrong since we are removing callers who called several times to different agents, without checking if those callers belong to them by checking if they do not exist under a different agent name in the Job Data (Closed) Sheet.
If they do exist under a different agent name in the Job Data (Closed) sheet then that call does Not need to be counted for them since another Agent submitted it.
Formula needs to Uniquely count how many times an agent had a call from a Caller(that wasn't submitted by another) and output on Live Report Sheet starting at D3 ('Live Report'!D3) column D (Unique Calls): Final Live Report Sheet:
SumProduct? Maybe combined with index/match or countifs? im exhausted from trying :O
Help is much appreciated
----------- UPDATE----------
Updating the question more clearly:
The output we are trying to achieve is:
Count If AND all conditions occur:
Look for Agent 'Live Report'!D3 in: (Calls!E:E) and count rows by unique callers number (Calls!H:H)
& make sure before counting above that this occur:
Take the relevant Caller's Number from same row on condition 1, for example: (Calls!H123) from range (Calls!H:H) and look for it in Table 2 callers Numbers range: 'Job Data (Closed)'!M:M
If found - for example on row 80, Look at the found row on the new table 2 'Job Data (Closed)', and Match the found call's Agent Name, for example: 'Job Data (Closed)'!D80 from column Range D 'Job Data (Closed)'!D:D to the Agent name from Table 1 from range (Calls!E:E) row 123.
If its different then do Not Count this call for Agent: 'Live Report'!D3
If its the same name then count the call as 1 for Agent: 'Live Report'!D3
If Name Not found then count the call as 1 for Agent: 'Live Report'!D3
This explanation actually helped me think of what we need, I hope this will help you figure out what we need to formulate here.
Appreciated much :)
I tried this method:
=COUNTIFS(Calls!E:E,'Live Report'!B3)-SUMPRODUCT(('Job Data (Closed)'!D:D="'Live Report'!B3")*('Job Data (Closed)'!M:M="'Calls!H:H"))
thinking to count all calls and then reduce callers that exist under a different agent name - it does not work since it doesn't know the row on the first countifs when it counts the Sumproduct, There's a Range Calls!H:H instead of one cell to compare to on the criteria2 of the SumPRoduct...
Fun with Array Formula, via SUMPRODUCT!
Count Unique entries:
=SUMPRODUCT(1/COUNTIF(Target_Range, Target_Range))
For every entry in the list, it adds 1, divided by the number of times that value appears in the list. This means, if the value "Hello World" appears 3 times in the list, then it adds 1/3 for each "Hello World" - which adds up to 1 for that Unique Value
Count Unique entries, Excluding from another list:
=SUMPRODUCT(--(COUNTIF(Exclude_Range, Target_Range)<1)/COUNTIF(Target_Range, Target_Range))
The only change here is that we check if the entry appears in our list of entries to exclude, and convert that to 1 or 0. Since 0 divided by anything is still 0, it means we do not add any count for that Value
My worksheets:
ELKK BSN Voornaam Achternaam DOB Basisschool Advies Voorrangschool Voorkeur
1 1 John Smit 1 Test VWO Test Test
2 2 Chris Kong 2 Test 2 HAVO Test Test
This worksheet is called Leerlingen
The second one:
School Advies Klasnaam Regulier
Test VWO VWO 1
Test 2 HAVO HAVO 1
Test 3 VWO SPORT 0
This worksheet is called VO-scholen
What I want to happen is, when I change the value "Advies" in the Leerlingen worksheet. I want to get all the schools from the VO-scholen Worksheet who also have that "Advies" and return them in the Leerlingen worksheet into a list under the column "Voorrangschool".
This means that with "John Smit" I can select the schools Test and Test 3, and with "Chris Kong" I can select the school Test 2.
Here is what I already tried:
=INDEX('VO-scholen'!A2:G4;MATCH(G2; 'VO-scholen'!$C$2:$C$4; 0);2 )
But it won't return multiple values, only the first value it can find.
my answer requires MOREFUNC addon*
Here I assume data in purchase "table" is in A9:C11. Adjust accordingly.
formula for Leerlingen!H2:
=MCONCAT(IF('VO-scholen'!$C$2:$C$4=G2,'VO-scholen'!$B$2:$B$4,""),",")
notice the curly braces. This is an array formula you have to confirm using Ctrl+Shift+Enter, not just Enter (so that curly braces appear)
then copy the formula down
MOREFUNC ADDON
Morefunc Addon is a free library of 66 new worksheet functions.
HERE is some information (by original author)
here is the last working download link I found
here is a good installation walk-through video
You'll want to modify this a little, but try:
=INDEX('VO-scholen'!$A$1:$G$4,MATCH($G2, 'VO-scholen'!$B$1:$B$4, 0),1 ) & IF(COUNTIF('VO-scholen'!$B:$B,Leerlingen!$G2)>1, ", " & INDEX(OFFSET('VO-scholen'!$A$1:$D$4,MATCH($G2,'VO-scholen'!$B$1:$B$4),0),MATCH($G2,'VO-scholen'!$B$1:$B$4),1),"")
The first index match grabs the first value in the table. The second index match grabs the first value in an offset from the first table. The offset starts the second lookup table down the number of rows from the first lookup value. In other words if you were searching in B1:B100 and the value was found in row 3, the second lookup will be in B4:B104.